@@ -975,103 +975,104 @@ func (c *SQLiteConn) begin(ctx context.Context) (driver.Tx, error) {
975975// The argument is may be either in parentheses or it may be separated from
976976// the pragma name by an equal sign. The two syntaxes yield identical results.
977977// In many pragmas, the argument is a boolean. The boolean can be one of:
978- // 1 yes true on
979- // 0 no false off
978+ //
979+ // 1 yes true on
980+ // 0 no false off
980981//
981982// You can specify a DSN string using a URI as the filename.
982- // test.db
983- // file:test.db?cache=shared&mode=memory
984- // :memory:
985- // file::memory:
986983//
987- // mode
988- // Access mode of the database.
989- // https://www.sqlite.org/c3ref/open.html
990- // Values:
991- // - ro
992- // - rw
993- // - rwc
994- // - memory
984+ // test.db
985+ // file:test.db?cache=shared&mode=memory
986+ // :memory:
987+ // file::memory:
995988//
996- // cache
997- // SQLite Shared-Cache Mode
998- // https://www.sqlite.org/sharedcache.html
999- // Values:
1000- // - shared
1001- // - private
989+ // mode
990+ // Access mode of the database.
991+ // https://www.sqlite.org/c3ref/open.html
992+ // Values:
993+ // - ro
994+ // - rw
995+ // - rwc
996+ // - memory
1002997//
1003- // immutable=Boolean
1004- // The immutable parameter is a boolean query parameter that indicates
1005- // that the database file is stored on read-only media. When immutable is set,
1006- // SQLite assumes that the database file cannot be changed,
1007- // even by a process with higher privilege,
1008- // and so the database is opened read-only and all locking and change detection is disabled.
1009- // Caution: Setting the immutable property on a database file that
1010- // does in fact change can result in incorrect query results and/or SQLITE_CORRUPT errors.
998+ // cache
999+ // SQLite Shared-Cache Mode
1000+ // https://www.sqlite.org/sharedcache.html
1001+ // Values:
1002+ // - shared
1003+ // - private
10111004//
1012- // go-sqlite3 adds the following query parameters to those used by SQLite:
1013- // _loc=XXX
1014- // Specify location of time format. It's possible to specify "auto".
1005+ // immutable=Boolean
1006+ // The immutable parameter is a boolean query parameter that indicates
1007+ // that the database file is stored on read-only media. When immutable is set,
1008+ // SQLite assumes that the database file cannot be changed,
1009+ // even by a process with higher privilege,
1010+ // and so the database is opened read-only and all locking and change detection is disabled.
1011+ // Caution: Setting the immutable property on a database file that
1012+ // does in fact change can result in incorrect query results and/or SQLITE_CORRUPT errors.
10151013//
1016- // _mutex=XXX
1017- // Specify mutex mode. XXX can be "no", "full".
1014+ // go-sqlite3 adds the following query parameters to those used by SQLite:
10181015//
1019- // _txlock=XXX
1020- // Specify locking behavior for transactions. XXX can be "immediate",
1021- // "deferred", "exclusive".
1016+ // _loc=XXX
1017+ // Specify location of time format. It's possible to specify "auto".
10221018//
1023- // _auto_vacuum=X | _vacuum=X
1024- // 0 | none - Auto Vacuum disabled
1025- // 1 | full - Auto Vacuum FULL
1026- // 2 | incremental - Auto Vacuum Incremental
1019+ // _mutex=XXX
1020+ // Specify mutex mode. XXX can be "no", "full".
10271021//
1028- // _busy_timeout=XXX"| _timeout=XXX
1029- // Specify value for sqlite3_busy_timeout.
1022+ // _txlock=XXX
1023+ // Specify locking behavior for transactions. XXX can be "immediate",
1024+ // "deferred", "exclusive".
10301025//
1031- // _case_sensitive_like=Boolean | _cslike=Boolean
1032- // https://www.sqlite.org/pragma.html#pragma_case_sensitive_like
1033- // Default or disabled the LIKE operation is case-insensitive.
1034- // When enabling this options behaviour of LIKE will become case-sensitive.
1026+ // _auto_vacuum=X | _vacuum=X
1027+ // 0 | none - Auto Vacuum disabled
1028+ // 1 | full - Auto Vacuum FULL
1029+ // 2 | incremental - Auto Vacuum Incremental
10351030//
1036- // _defer_foreign_keys=Boolean | _defer_fk=Boolean
1037- // Defer Foreign Keys until outermost transaction is committed .
1031+ // _busy_timeout=XXX"| _timeout=XXX
1032+ // Specify value for sqlite3_busy_timeout .
10381033//
1039- // _foreign_keys=Boolean | _fk=Boolean
1040- // Enable or disable enforcement of foreign keys.
1034+ // _case_sensitive_like=Boolean | _cslike=Boolean
1035+ // https://www.sqlite.org/pragma.html#pragma_case_sensitive_like
1036+ // Default or disabled the LIKE operation is case-insensitive.
1037+ // When enabling this options behaviour of LIKE will become case-sensitive.
10411038//
1042- // _ignore_check_constraints=Boolean
1043- // This pragma enables or disables the enforcement of CHECK constraints.
1044- // The default setting is off, meaning that CHECK constraints are enforced by default.
1039+ // _defer_foreign_keys=Boolean | _defer_fk=Boolean
1040+ // Defer Foreign Keys until outermost transaction is committed.
10451041//
1046- // _journal_mode=MODE | _journal=MODE
1047- // Set journal mode for the databases associated with the current connection.
1048- // https://www.sqlite.org/pragma.html#pragma_journal_mode
1042+ // _foreign_keys=Boolean | _fk=Boolean
1043+ // Enable or disable enforcement of foreign keys.
10491044//
1050- // _locking_mode=X | _locking=X
1051- // Sets the database connection locking-mode.
1052- // The locking-mode is either NORMAL or EXCLUSIVE.
1053- // https://www.sqlite.org/pragma.html#pragma_locking_mode
1045+ // _ignore_check_constraints=Boolean
1046+ // This pragma enables or disables the enforcement of CHECK constraints.
1047+ // The default setting is off, meaning that CHECK constraints are enforced by default.
10541048//
1055- // _query_only=Boolean
1056- // The query_only pragma prevents all changes to database files when enabled.
1049+ // _journal_mode=MODE | _journal=MODE
1050+ // Set journal mode for the databases associated with the current connection.
1051+ // https://www.sqlite.org/pragma.html#pragma_journal_mode
10571052//
1058- // _recursive_triggers=Boolean | _rt=Boolean
1059- // Enable or disable recursive triggers.
1053+ // _locking_mode=X | _locking=X
1054+ // Sets the database connection locking-mode.
1055+ // The locking-mode is either NORMAL or EXCLUSIVE.
1056+ // https://www.sqlite.org/pragma.html#pragma_locking_mode
10601057//
1061- // _secure_delete=Boolean|FAST
1062- // When secure_delete is on, SQLite overwrites deleted content with zeros.
1063- // https://www.sqlite.org/pragma.html#pragma_secure_delete
1058+ // _query_only=Boolean
1059+ // The query_only pragma prevents all changes to database files when enabled.
10641060//
1065- // _synchronous=X | _sync=X
1066- // Change the setting of the "synchronous" flag.
1067- // https://www.sqlite.org/pragma.html#pragma_synchronous
1061+ // _recursive_triggers=Boolean | _rt=Boolean
1062+ // Enable or disable recursive triggers.
10681063//
1069- // _writable_schema=Boolean
1070- // When this pragma is on, the SQLITE_MASTER tables in which database
1071- // can be changed using ordinary UPDATE, INSERT, and DELETE statements.
1072- // Warning: misuse of this pragma can easily result in a corrupt database file.
1064+ // _secure_delete=Boolean|FAST
1065+ // When secure_delete is on, SQLite overwrites deleted content with zeros.
1066+ // https://www.sqlite.org/pragma.html#pragma_secure_delete
10731067//
1068+ // _synchronous=X | _sync=X
1069+ // Change the setting of the "synchronous" flag.
1070+ // https://www.sqlite.org/pragma.html#pragma_synchronous
10741071//
1072+ // _writable_schema=Boolean
1073+ // When this pragma is on, the SQLITE_MASTER tables in which database
1074+ // can be changed using ordinary UPDATE, INSERT, and DELETE statements.
1075+ // Warning: misuse of this pragma can easily result in a corrupt database file.
10751076func (d * SQLiteDriver ) Open (dsn string ) (driver.Conn , error ) {
10761077 if C .sqlite3_threadsafe () == 0 {
10771078 return nil , errors .New ("sqlite library was not compiled for thread-safe operation" )
0 commit comments