@@ -8,10 +8,13 @@ Rebol [
8
8
]
9
9
10
10
print "Trying to import SQLite extension..."
11
- ;; make sure that we load a fresh extension
12
- try [system/modules/sqlite: none]
13
- ;; use current directory as a modules location
14
- system/options/modules: what-dir
11
+ ;; In the GitHub Actions, the built extension is copied into the current directory.
12
+ unless empty? read %sqlite*.rebx [
13
+ ;; make sure that we load a fresh extension
14
+ try [system/modules/sqlite: none]
15
+ ;; use current directory as a modules location
16
+ system/options/modules: what-dir
17
+ ]
15
18
16
19
sqlite: import sqlite
17
20
@@ -70,7 +73,7 @@ sys/make-scheme [
70
73
port
71
74
]
72
75
73
- ;; WRITE is now just executes a query... no result is collected, but may be printed in console
76
+ ;; WRITE now just executes a query... no result is collected, but may be printed in console
74
77
write : func [ port [port! ] query [string! ]] [
75
78
unless open? port [ cause-error 'Access 'not-open port/spec/ref ]
76
79
sqlite/exec port/state/db port/state/query: query
@@ -152,6 +155,22 @@ sys/make-scheme [
152
155
;------------------------------------------------------------------------------------------------
153
156
;print sqlite/info
154
157
158
+ db: open /new sqlite:chinook.db
159
+
160
+ probe read insert db {SELECT
161
+ InvoiceId,
162
+ BillingAddress,
163
+ date(InvoiceDate) InvoiceDate,
164
+ Total
165
+ FROM
166
+ invoices
167
+ WHERE
168
+ InvoiceDate NOT BETWEEN '2009-01-03' AND '2013-12-01'
169
+ ORDER BY
170
+ InvoiceDate;
171
+ }
172
+ quit
173
+
155
174
;open sqlite:new.db ;; would throw an error, if the file ./new.db does not exists
156
175
;open sqlite:/home/oldes/new.db ;; used full path to the DB file
157
176
0 commit comments