Skip to content

Commit f6cea9f

Browse files
committedJun 4, 2024·
FEAT: updated to SQLite version 3.46.0
1 parent 573517b commit f6cea9f

23 files changed

+11275
-6037
lines changed
 

‎.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@
77
!/*.nest
88
!/sqlite
99
!README.md
10+
!LICENSE
1011
!ci-test.r3
1112
!sqlite-scheme.r3

‎LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2024 Oldes
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎Rebol-SQLite.nest

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
1-
;~ Siskin project nest file ~;
1+
;- .-.
2+
;- /'v'\ SISKIN-Builder project file
3+
;- (/uOu\) https://github.com/Siskin-framework/Builder/
4+
;-===="="=======================================================================
5+
26
compiler: clang
3-
version: 3.44.2
7+
version: 3.46.0
48

59
;define: USE_TRACES
610

‎sqlite-scheme.r3

+24-5
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,13 @@ Rebol [
88
]
99

1010
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+
]
1518

1619
sqlite: import sqlite
1720

@@ -70,7 +73,7 @@ sys/make-scheme [
7073
port
7174
]
7275

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
7477
write: func[port [port!] query [string!]][
7578
unless open? port [ cause-error 'Access 'not-open port/spec/ref ]
7679
sqlite/exec port/state/db port/state/query: query
@@ -152,6 +155,22 @@ sys/make-scheme [
152155
;------------------------------------------------------------------------------------------------
153156
;print sqlite/info
154157

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+
155174
;open sqlite:new.db ;; would throw an error, if the file ./new.db does not exists
156175
;open sqlite:/home/oldes/new.db ;; used full path to the DB file
157176

‎sqlite/sqlite3.c

+10,931-5,975
Large diffs are not rendered by default.

‎sqlite/sqlite3.h

+163-38
Large diffs are not rendered by default.

‎src/sqlite-command-close.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-columns.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-eval.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-exec.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-finalize.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-info.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-initialize.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-last-insert-id.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-open.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-prepare.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-reset.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-shutdown.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-step.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command-trace.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-command.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-command.h"

‎src/sqlite-rebol-extension.c

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,13 @@
1+
// ____ __ __ ______ __
2+
// / __ \/ /__/ /__ ___ /_ __/__ ____/ /
3+
// / /_/ / / _ / -_|_-<_ / / / -_) __/ _ \
4+
// \____/_/\_,_/\__/___(@)_/ \__/\__/_// /
5+
// ~~~ oldes.huhuman at gmail.com ~~~ /_/
16
//
7+
// SPDX-License-Identifier: MIT
8+
// =============================================================================
29
// Rebol/SQLite extension
3-
// ====================================
10+
// =============================================================================
411
// Use on your own risc!
512

613
#include "sqlite-rebol-extension.h"

‎src/sqlite-rebol-extension.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ int cmd_sqlite_shutdown(RXIFRM *frm, void *ctx);
5252
typedef int (*MyCommandPointer)(RXIFRM *frm, void *ctx);
5353

5454
#define EXT_SQLITE_INIT_CODE \
55-
"REBOL [Title: \"Rebol SQLite Extension\" Name: sqlite Type: module Exports: [] Version: 3.44.2.0 Author: Oldes Date: 16-Dec-2023/15:01:06+1:00 License: Apache-2.0 Url: https://github.com/Siskin-framework/Rebol-SQLite]\n"\
55+
"REBOL [Title: \"Rebol SQLite Extension\" Name: sqlite Type: module Exports: [] Version: 3.44.2.0 Author: Oldes Date: 4-Jun-2024/14:25:37+2:00 License: Apache-2.0 Url: https://github.com/Siskin-framework/Rebol-SQLite]\n"\
5656
"info: command [\"Returns info about SQLite extension library\" /of handle [handle!] \"SQLite Extension handle\"]\n"\
5757
"open: command [\"Opens a new database connection\" file [file!]]\n"\
5858
"exec: command [{Runs zero or more semicolon-separate SQL statements} db [handle!] \"sqlite-db\" sql [string!] \"statements\"]\n"\

0 commit comments

Comments
 (0)
Please sign in to comment.