File tree Expand file tree Collapse file tree
ruby/ql/test/library-tests/frameworks/sqlite3 Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ sqlite3SqlConstruction
22| sqlite3.rb:5:1:5:17 | call to execute | sqlite3.rb:5:12:5:17 | <<-SQL |
33| sqlite3.rb:12:8:12:41 | call to prepare | sqlite3.rb:12:19:12:41 | "select * from numbers" |
44| sqlite3.rb:17:3:19:5 | call to execute | sqlite3.rb:17:15:17:35 | "select * from table" |
5+ | sqlite3.rb:29:7:29:40 | call to execute | sqlite3.rb:29:19:29:39 | "select * from table" |
56sqlite3SqlExecution
67| sqlite3.rb:5:1:5:17 | call to execute | sqlite3.rb:5:12:5:17 | <<-SQL |
78| sqlite3.rb:14:1:14:12 | call to execute | sqlite3.rb:12:8:12:9 | db |
89| sqlite3.rb:17:3:19:5 | call to execute | sqlite3.rb:17:15:17:35 | "select * from table" |
10+ | sqlite3.rb:29:7:29:40 | call to execute | sqlite3.rb:29:19:29:39 | "select * from table" |
Original file line number Diff line number Diff line change 1818 p row
1919 end
2020end
21+
22+
23+ class MyDatabaseWrapper
24+ def initialize ( filename )
25+ @db = SQLite3 ::Database . new ( filename , results_as_hash : true )
26+ end
27+
28+ def select_rows ( category )
29+ @db . execute ( "select * from table" )
30+ end
31+ end
You can’t perform that action at this time.
0 commit comments