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
215be9f6
Commit
215be9f6
authored
Sep 21, 2011
by
gwenn
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add some bindings: MemoryUsed, MemoryHighwater, SoftHeapLimit, Complete.
parent
28cc70a5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
25 additions
and
0 deletions
+25
-0
trace.go
trace.go
+25
-0
No files found.
trace.go
View file @
215be9f6
...
...
@@ -232,3 +232,28 @@ const (
func
(
s
*
Stmt
)
Status
(
op
StmtStatus
,
reset
bool
)
int
{
return
int
(
C
.
sqlite3_stmt_status
(
s
.
stmt
,
C
.
int
(
op
),
btocint
(
reset
)))
}
// Calls sqlite3_memory_used: http://sqlite.org/c3ref/memory_highwater.html
func
MemoryUsed
()
int64
{
return
int64
(
C
.
sqlite3_memory_used
())
}
// Calls sqlite3_memory_highwater: http://sqlite.org/c3ref/memory_highwater.html
func
MemoryHighwater
(
reset
bool
)
int64
{
return
int64
(
C
.
sqlite3_memory_highwater
(
btocint
(
reset
)))
}
// Calls http://sqlite.org/c3ref/soft_heap_limit64.html
func
SoftHeapLimit
()
int64
{
return
SetSoftHeapLimit
(
-
1
)
}
// 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
)))
}
// Calls http://sqlite.org/c3ref/complete.html
func
Complete
(
sql
string
)
bool
{
cs
:=
C
.
CString
(
sql
)
defer
C
.
free
(
unsafe
.
Pointer
(
cs
))
return
C
.
sqlite3_complete
(
cs
)
!=
0
}
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