Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gosqlite
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
gosqlite
Commits
0cf2b8a4
Commit
0cf2b8a4
authored
Nov 10, 2012
by
gwenn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Misc
parent
12b1698f
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
66 additions
and
68 deletions
+66
-68
README.md
README.md
+66
-68
No files found.
README.md
View file @
0cf2b8a4
...
...
@@ -5,20 +5,18 @@ This binding implements the "database/sql/driver" interface.
See
[
package documentation
](
http://go.pkgdoc.org/github.com/gwenn/gosqlite
)
.
<pre>
Open supports flags.
Conn#Exec handles multiple statements (separated by semicolons) properly.
Conn#Prepare can optionnaly #Bind as well.
Conn#Prepare can reuse already prepared Stmt.
Conn#Close ensures that all dangling statements are finalized.
Stmt#Exec is renamed in Stmt#Bind and a new Stmt#Exec method is introduced to #Bind and #Step.
Stmt#Bind uses native sqlite3_bind_x methods and failed if unsupported type.
Stmt#NamedBind can be used to bind by name.
Stmt#Next returns a (bool, os.Error) couple like Reader#Read.
Stmt#Scan uses native sqlite3_column_x methods.
Stmt#NamedScan is added. It's compliant with
[
go-dbi
](
https://github.com/thomaslee/go-dbi/
)
.
Open supports flags.
Conn#Exec handles multiple statements (separated by semicolons) properly.
Conn#Prepare can optionnaly #Bind as well.
Conn#Prepare can reuse already prepared Stmt.
Conn#Close ensures that all dangling statements are finalized.
Stmt#Exec is renamed in Stmt#Bind and a new Stmt#Exec method is introduced to #Bind and #Step.
Stmt#Bind uses native sqlite3_bind_x methods and failed if unsupported type.
Stmt#NamedBind can be used to bind by name.
Stmt#Next returns a (bool, os.Error) couple like Reader#Read.
Stmt#Scan uses native sqlite3_column_x methods.
Stmt#NamedScan is added. It's compliant with
[
go-dbi
](
https://github.com/thomaslee/go-dbi/
)
.
Stmt#ScanByIndex/ScanByName are added to test NULL value.
</pre>
Currently, the weak point of the binding is the
*Scan*
methods:
The original implementation is using this strategy:
...
...
@@ -34,63 +32,63 @@ SQLite logs (SQLITE_CONFIG_LOG) can be activated by:
-
ConfigLog function
-
or
`export SQLITE_LOG=1`
<pre>
Misc:
Conn#Exists
Conn#OneValue
Conn#OpenVfs
Conn#EnableFkey/IsFKeyEnabled
Conn#Changes/TotalChanges
Conn#LastInsertRowid
Conn#Interrupt
Conn#Begin/BeginTransaction(type)/Commit/Rollback
Conn#GetAutocommit
Conn#EnableLoadExtension/LoadExtension
Conn#IntegrityCheck
Stmt#Insert/ExecDml/Select/SelectOneRow
Stmt#BindParameterCount/BindParameterIndex(name)/BindParameterName(index)
Stmt#ClearBindings
Stmt#ColumnCount/ColumnNames/ColumnIndex(name)/ColumnName(index)/ColumnType(index)
Stmt#ReadOnly
Stmt#Busy
Blob:
ZeroBlobLength
Conn#NewBlobReader
Conn#NewBlobReadWriter
Meta:
Conn#Databases
Conn#Tables
Conn#Columns
Conn#ForeignKeys
Conn#Indexes/IndexColumns
Time:
JulianDay
JulianDayToUTC
JulianDayToLocalTime
Trace:
Conn#BusyHandler
Conn#Profile
Conn#ProgressHandler
Conn#SetAuthorizer
Conn#Trace
Stmt#Status
Hook:
Conn#CommitHook
Conn#RollbackHook
Conn#UpdateHook
Function:
Conn#CreateScalarFunction
Conn#CreateAggregateFunction
Misc:
Conn#Exists
Conn#OneValue
Conn#OpenVfs
Conn#EnableFkey/IsFKeyEnabled
Conn#Changes/TotalChanges
Conn#LastInsertRowid
Conn#Interrupt
Conn#Begin/BeginTransaction(type)/Commit/Rollback
Conn#GetAutocommit
Conn#EnableLoadExtension/LoadExtension
Conn#IntegrityCheck
Stmt#Insert/ExecDml/Select/SelectOneRow
Stmt#BindParameterCount/BindParameterIndex(name)/BindParameterName(index)
Stmt#ClearBindings
Stmt#ColumnCount/ColumnNames/ColumnIndex(name)/ColumnName(index)/ColumnType(index)
Stmt#ReadOnly
Stmt#Busy
Blob:
ZeroBlobLength
Conn#NewBlobReader
Conn#NewBlobReadWriter
Meta:
Conn#Databases
Conn#Tables
Conn#Columns
Conn#ForeignKeys
Conn#Indexes/IndexColumns
Time:
JulianDay
JulianDayToUTC
JulianDayToLocalTime
Trace:
Conn#BusyHandler
Conn#Profile
Conn#ProgressHandler
Conn#SetAuthorizer
Conn#Trace
Stmt#Status
Hook:
Conn#CommitHook
Conn#RollbackHook
Conn#UpdateHook
Function:
Conn#CreateScalarFunction
Conn#CreateAggregateFunction
$ go test -test.bench '.
*
'
<pre>
BenchmarkValuesScan 500000 4658 ns/op
BenchmarkScan 500000 324 ns/op
BenchmarkNamedScan 200000 9221 ns/op
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment