Commit Graph

16 Commits

Author SHA1 Message Date
Carlos Castillo 0dd71564e2 Changed extension support to load from a string list of extensions
By loading extensions this way, it's not possible to later load
extensions using db.Exec, which improves security, and makes it much
easier to load extensions correctly. The zero value for the slice
(the empty slice) loads no extensions by default.

The extension example has been updated to use this much simpler system.

The ConnectHook field is still in SQLiteDriver in case it's needed for
other driver-wide initialization.

Updates #71 of mattn/go-sqlite3.
2013-08-24 20:36:35 -07:00
Carlos Castillo 976f43861f Added error return to ConnectHook and fixed extension example
The ConnectHook field of an SQLiteDriver should return an error in
case something bad happened during the hook.

The extension example needs to load the extension in a ConnectHook,
otherwise the extension is only loaded in a single connection in the pool.
By putting the extension loading in the ConnectHook, its called for every
connection that is opened by the sql.DB.
2013-08-24 20:04:51 -07:00
mattn 248e51c050 Rename because travis bringup error 2013-08-23 14:29:04 +09:00
mattn ac279b69bf Fixes typo 2013-08-23 14:26:33 +09:00
mattn e6850435ff Possible to register custom driver 2013-08-23 13:58:54 +09:00
mattn e6690f40af Add example for sqlite3 extension 2013-08-23 09:59:23 +09:00
mattn 3420c2b872 Add example for sqlite3_with_extensions 2013-08-23 09:58:27 +09:00
mattn 6671b69503 mv 2013-08-23 09:58:17 +09:00
mattn 65fd601635 add example code using bulk insert. 2012-12-26 09:53:22 +09:00
mattn 7ea7c83912 use fmt.Println() 2012-12-07 20:36:57 +09:00
mattn d9c069459a remove Makefile. 2012-05-15 20:49:45 +09:00
mattn fdc20cdbcb add example of Prepare()/QueryRow(). add db.Close(). close #7 2012-02-23 14:30:50 +09:00
Scott Lawrence c7906ff723 Updating example 2012-01-20 11:44:56 -05:00
mattn 41c5c95a6c transaction. 2011-11-13 03:20:52 +09:00
mattn 79234d62ef gofmt. 2011-11-11 21:38:32 +09:00
mattn 6c2d2c4b6b first import. 2011-11-11 21:36:22 +09:00