File tree Expand file tree Collapse file tree 3 files changed +13
-11
lines changed
lib/activerecord_adbc_adapter Expand file tree Collapse file tree 3 files changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,11 @@ jobs:
6767 sudo systemctl restart postgresql
6868 sudo -u postgres -H psql -c "CREATE ROLE ${USER} SUPERUSER LOGIN;"
6969 - name : " Test: SQLite3"
70- env :
71- # We can remove this once ADBC 20 is released.
72- ACTIVERECORD_ADBC_ADAPTER_GC : disable
7370 run : |
7471 bundle exec rake
7572 - name : " Test: PostgreSQL"
7673 env :
7774 ACTIVERECORD_ADBC_ADAPTER_BACKEND : postgresql
78- # We can remove this once ADBC 20 is released.
79- ACTIVERECORD_ADBC_ADAPTER_GC : disable
8075 PGHOST : /var/run/postgresql
8176 run : |
8277 bundle exec rake
Original file line number Diff line number Diff line change @@ -33,8 +33,19 @@ def perform_query(raw_connection,
3333 raw_records [ bind . name ] = array
3434 end
3535 record_batch = Arrow ::RecordBatch . new ( raw_records )
36- statement . bind ( record_batch ) do
37- statement . execute [ 0 ]
36+ if defined? ( ::ADBCArrow )
37+ # We can remove this once ADBC 20 is released.
38+ begin
39+ statement . bind ( record_batch ) do
40+ statement . execute [ 0 ]
41+ end
42+ ensure
43+ GC . start
44+ end
45+ else
46+ statement . bind ( record_batch ) do
47+ statement . execute [ 0 ]
48+ end
3849 end
3950 end
4051 end
Original file line number Diff line number Diff line change 55
66require_relative "helper/user"
77
8- if ENV [ "ACTIVERECORD_ADBC_ADAPTER_GC" ] == "disable"
9- GC . disable
10- end
11-
128if ENV [ "ACTIVERECORD_ADBC_ADAPTER_DEBUG" ] == "yes"
139 ActiveRecord ::Base . logger = ActiveSupport ::Logger . new ( STDERR )
1410end
You can’t perform that action at this time.
0 commit comments