Commit 948bf3ce authored by gwenn's avatar gwenn

Document API entries that can't be used with cgocheck enabled.

parent 746114df
......@@ -470,6 +470,7 @@ func goXDestroy(pApp unsafe.Pointer) {
const sqliteDeterministic = 0x800 // C.SQLITE_DETERMINISTIC
// CreateScalarFunction creates or redefines SQL scalar functions.
// Cannot be used with Go >= 1.6 and cgocheck enabled.
// TODO Make possible to specify the preferred encoding
// (See http://sqlite.org/c3ref/create_function.html)
func (c *Conn) CreateScalarFunction(functionName string, nArg int32, deterministic bool, pApp interface{},
......@@ -498,6 +499,7 @@ func (c *Conn) CreateScalarFunction(functionName string, nArg int32, determinist
}
// CreateAggregateFunction creates or redefines SQL aggregate functions.
// Cannot be used with Go >= 1.6 and cgocheck enabled.
// TODO Make possible to specify the preferred encoding
// (See http://sqlite.org/c3ref/create_function.html)
func (c *Conn) CreateAggregateFunction(functionName string, nArg int32, pApp interface{},
......
......@@ -34,6 +34,7 @@ func goXCommitHook(udp unsafe.Pointer) C.int {
}
// CommitHook registers a callback function to be invoked whenever a transaction is committed.
// Cannot be used with Go >= 1.6 and cgocheck enabled.
// (See http://sqlite.org/c3ref/commit_hook.html)
func (c *Conn) CommitHook(f CommitHook, udp interface{}) {
if f == nil {
......@@ -61,6 +62,7 @@ func goXRollbackHook(udp unsafe.Pointer) {
}
// RollbackHook registers a callback to be invoked each time a transaction is rolled back.
// Cannot be used with Go >= 1.6 and cgocheck enabled.
// (See http://sqlite.org/c3ref/commit_hook.html)
func (c *Conn) RollbackHook(f RollbackHook, udp interface{}) {
if f == nil {
......@@ -89,6 +91,7 @@ func goXUpdateHook(udp unsafe.Pointer, action int, dbName, tableName *C.char, ro
// UpdateHook registers a callback to be invoked each time a row is updated,
// inserted or deleted using this database connection.
// Cannot be used with Go >= 1.6 and cgocheck enabled.
// (See http://sqlite.org/c3ref/update_hook.html)
func (c *Conn) UpdateHook(f UpdateHook, udp interface{}) {
if f == nil {
......
......@@ -50,6 +50,7 @@ func goXTrace(udp unsafe.Pointer, sql *C.char) {
// There can only be a single tracer defined for each database connection.
// Setting a new tracer clears the old one.
// If f is nil, the current tracer is removed.
// Cannot be used with Go >= 1.6 and cgocheck enabled.
// (See sqlite3_trace, http://sqlite.org/c3ref/profile.html)
func (c *Conn) Trace(f Tracer, udp interface{}) {
if f == nil {
......@@ -82,6 +83,7 @@ func goXProfile(udp unsafe.Pointer, sql *C.char, nanoseconds C.sqlite3_uint64) {
// There can only be a single profiler defined for each database connection.
// Setting a new profiler clears the old one.
// If f is nil, the current profiler is removed.
// Cannot be used with Go >= 1.6 and cgocheck enabled.
// (See sqlite3_profile, http://sqlite.org/c3ref/profile.html)
func (c *Conn) Profile(f Profiler, udp interface{}) {
if f == nil {
......@@ -233,6 +235,7 @@ func goXAuth(udp unsafe.Pointer, action int, arg1, arg2, dbName, triggerName *C.
}
// SetAuthorizer sets or clears the access authorization function.
// Cannot be used with Go >= 1.6 and cgocheck enabled.
// (See http://sqlite.org/c3ref/set_authorizer.html)
func (c *Conn) SetAuthorizer(f Authorizer, udp interface{}) error {
if f == nil {
......@@ -265,6 +268,7 @@ func goXBusy(udp unsafe.Pointer, count int) C.int {
// There can only be a single busy handler defined for each database connection.
// Setting a new busy handler clears any previously set handler.
// If f is nil, the current handler is removed.
// Cannot be used with Go >= 1.6 and cgocheck enabled.
// (See http://sqlite.org/c3ref/busy_handler.html)
func (c *Conn) BusyHandler(f BusyHandler, udp interface{}) error {
if f == nil {
......@@ -299,6 +303,7 @@ func goXProgress(udp unsafe.Pointer) C.int {
// Only a single progress handler may be defined at one time per database connection.
// Setting a new progress handler cancels the old one.
// If f is nil, the current handler is removed.
// Cannot be used with Go >= 1.6 and cgocheck enabled.
// (See http://sqlite.org/c3ref/progress_handler.html)
func (c *Conn) ProgressHandler(f ProgressHandler, numOps int32, udp interface{}) {
if f == nil {
......@@ -396,6 +401,7 @@ var logger *sqliteLogger
// ConfigLog configures the logger of the SQLite library.
// Only one logger can be registered at a time for the whole program.
// The logger must be threadsafe.
// Cannot be used with Go >= 1.6 and cgocheck enabled when udp is not nil.
// (See sqlite3_config(SQLITE_CONFIG_LOG,...): http://sqlite.org/c3ref/config.html and http://www.sqlite.org/errlog.html)
func ConfigLog(f Logger, udp interface{}) error {
var rv C.int
......
......@@ -233,6 +233,7 @@ func (c *Conn) DeclareVTab(sql string) error {
}
// CreateModule registers a virtual table implementation.
// Cannot be used with Go >= 1.6 and cgocheck enabled.
// (See http://sqlite.org/c3ref/create_module.html)
func (c *Conn) CreateModule(moduleName string, module Module) error {
mname := C.CString(moduleName)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment