File tree Expand file tree Collapse file tree 2 files changed +13
-0
lines changed
ruby/ql/test/library-tests/frameworks/sqlite3 Expand file tree Collapse file tree 2 files changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -2,7 +2,9 @@ sqlite3SqlConstruction
2
2
| sqlite3.rb:5:1:5:17 | call to execute | sqlite3.rb:5:12:5:17 | <<-SQL |
3
3
| sqlite3.rb:12:8:12:41 | call to prepare | sqlite3.rb:12:19:12:41 | "select * from numbers" |
4
4
| 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" |
5
6
sqlite3SqlExecution
6
7
| sqlite3.rb:5:1:5:17 | call to execute | sqlite3.rb:5:12:5:17 | <<-SQL |
7
8
| sqlite3.rb:14:1:14:12 | call to execute | sqlite3.rb:12:8:12:9 | db |
8
9
| 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 18
18
p row
19
19
end
20
20
end
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