Skip to content

Commit 54c5ff9

Browse files
committed
Fix 4/5 sqlite dbconsole tests
1 parent 5aa6b62 commit 54c5ff9

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

lib/arjdbc/sqlite3/adapter.rb

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,16 @@ def _limit
780780
::ActiveRecord::Type.register(:integer, SQLite3Integer, adapter: :sqlite3)
781781

782782
class << self
783+
def dbconsole(config, options = {})
784+
args = []
785+
786+
args << "-#{options[:mode]}" if options[:mode]
787+
args << "-header" if options[:header]
788+
args << File.expand_path(config.database, const_defined?(:Rails) && Rails.respond_to?(:root) ? Rails.root : nil)
789+
790+
find_cmd_and_exec("sqlite3", *args)
791+
end
792+
783793
private
784794
def initialize_type_map(m)
785795
super

0 commit comments

Comments
 (0)