tdbc::sqlite3(n)
π tdbc::sqlite3(n) π
okay so this is the Tcl Database Connectivity page for the tdbc::sqlite3 driver, bestie. It's the TDBC driver for the SQLite3 database manager, and it's also a worked example of how to write a database driver in Tcl so driver authors have a starting point for further development. It's giving "reference manual but make it a group chat." π
πΈ NAME πΈ
tdbc::sqlite3 β TDBC driver for the SQLite3 database manager.
β¨ SYNOPSIS β¨
package require tdbc::sqlite3 1.0
tdbc::sqlite3::connection create db fileName ?-option value...?
π¦ DESCRIPTION π¦
The tdbc::sqlite3 driver provides a database interface that conforms to Tcl DataBase Connectivity (TDBC) and allows a Tcl script to connect to a SQLite3 database. It is also provided as a worked example of how to write a database driver in Tcl, so that driver authors have a starting point for further development. No cap, that's literally in the spec. π
Connection to a SQLite3 database is established by invoking tdbc::sqlite3::connection create, passing it a string to be used as the connection handle followed by the file name of the database. The side effect of tdbc::sqlite3::connection create is to create a new database connection.. (yes, two dots, she's dramatic). As an alternative, tdbc::sqlite::connection new may be used to create a database connection with an automatically assigned name. The return value from tdbc::sqlite::connection new is the name that was chosen for the connection handle. See tdbc::connection(n) for the details of how to use the connection to manipulate a database. π«Ά
π CONFIGURATION OPTIONS π
The standard configuration options -encoding, -isolation, -readonly, and -timeout are all recognized, both on tdbc::sqlite3::connection create and on the configure method of the resulting connection. Slay.
-encodingβ since the encoding of a SQLite3 database is always well known, the-encodingoption accepts onlyutf-8as an encoding and always returnsutf-8for an encoding. The actual encoding may be set using a SQLite3PRAGMAstatement when creating a new database.-isolationβ only the isolation levelsreaduncommittedandserializableare implemented. Other isolation levels are promoted toserializable.-readonlyβ this flag is not implemented. A false boolean value is accepted silently, while any other value reports an error.-keepcaseβ this flag is special and controls how table and column names are reported in the various methods to retrieve database metadata. By default the flag is zero, i.e. table and column names are reported all lower case. Otherwise, table and column names are reported as defined in the database.
π BUGS π
If any column name is not unique among the columns in a result set, the results of -as dicts returns will be missing all but the rightmost of the duplicated columns. This limitation can be worked around by adding appropriate AS clauses to SELECT statements to ensure that all returned column names are unique. Plans are to fix this bug by using a C implementation of the driver, which will also improve performance significantly. Not me reading the bug section and feeling seen π.
π SEE ALSO π
tdbc(n)tdbc::connection(n)tdbc::resultset(n)tdbc::statement(n)
π KEYWORDS π
TDBC, SQL, SQLite3, database, connectivity, connection. Collect them all, bestie. β¨
π COPYRIGHT π
Copyright (c) 2008 by Kevin B. Kenny.
βΏ Tcl 8.6 edition Β· tdbc::sqlite3(n) Β· footer date is not shown in the original, no cap Β· π«Ά
π¦ where this page comes from
- alpine 3.22: tcl-doc 8.6.16-r0 Β· TCL
- alpine 3.23: tcl-doc 8.6.17-r0 Β· TCL
- alpine 3.23: tcl9-doc 9.0.3-r0 Β· TCL
- alpine 3.24: tcl-doc 8.6.17-r1 Β· TCL
- alpine 3.24: tcl9-doc 9.0.3-r2 Β· TCL
- arch rolling: tcl 8.6.16-1 Β· TCL
- nixos 26.05: tcl 9.0.3
- nixpkgs unstable: tcl 9.1.0
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· TCL
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· TCL
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· TCL
- opensuse-leap 16.0: tcl 8.6.15-160000.2.2 Β· TCL
- Copyright (c) 2008 by Kevin B. Kenny
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms