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
0830587d
Commit
0830587d
authored
Sep 21, 2011
by
gwenn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Ugly binding to sqlite3_log.
parent
215be9f6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
1 deletion
+13
-1
trace.go
trace.go
+13
-1
No files found.
trace.go
View file @
0830587d
...
...
@@ -38,6 +38,11 @@ extern int goXProgress(void *pArg);
static void goSqlite3ProgressHandler(sqlite3 *db, int freq, void *pArg) {
sqlite3_progress_handler(db, freq, goXProgress, pArg);
}
// cgo doesn't support varargs
static void my_log(int iErrCode, char *msg) {
sqlite3_log(iErrCode, msg);
}
*/
import
"C"
...
...
@@ -248,7 +253,7 @@ func SoftHeapLimit() int64 {
}
// Calls http://sqlite.org/c3ref/soft_heap_limit64.html
func
SetSoftHeapLimit
(
n
int64
)
int64
{
return
int64
(
C
.
sqlite3_soft_heap_limit64
(
C
.
sqlite3_int64
(
n
)))
return
int64
(
C
.
sqlite3_soft_heap_limit64
(
C
.
sqlite3_int64
(
n
)))
}
// Calls http://sqlite.org/c3ref/complete.html
...
...
@@ -257,3 +262,10 @@ func Complete(sql string) bool {
defer
C
.
free
(
unsafe
.
Pointer
(
cs
))
return
C
.
sqlite3_complete
(
cs
)
!=
0
}
// Calls http://sqlite.org/c3ref/log.html
func
Log
(
err
/*Errno*/
int
,
msg
string
)
{
cs
:=
C
.
CString
(
msg
)
defer
C
.
free
(
unsafe
.
Pointer
(
cs
))
C
.
my_log
(
C
.
int
(
err
),
cs
)
}
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