forked from mattn/go-sqlite3
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add stubbed out support for Sessions
- Loading branch information
Showing
1 changed file
with
74 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
//go:build !sqlite_omit_session | ||
// +build !sqlite_omit_session | ||
|
||
package sqlite3 | ||
|
||
/* | ||
#cgo CFLAGS: -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK | ||
#cgo LDFLAGS: -lm | ||
*/ | ||
|
||
/* | ||
#ifndef USE_LIBSQLITE3 | ||
#include "sqlite3-binding.h" | ||
#else | ||
#include <sqlite3.h> | ||
#endif | ||
#include <stdlib.h> | ||
*/ | ||
import "C" | ||
|
||
// CreateSession creates a new session object. | ||
func (c *SQLiteConn) CreateSession() error { | ||
return nil | ||
} | ||
|
||
// AttachSession attaches a session object to a set of tables. | ||
func (c *SQLiteConn) AttachSession() error { | ||
return nil | ||
} | ||
|
||
// DetachSession deletes a session object. | ||
func (c *SQLiteConn) DeleteSession() error { | ||
return nil | ||
} | ||
|
||
// SessionChangeset generates a changeset from a session object. | ||
func (c *SQLiteConn) Changeset() error { | ||
return nil | ||
} | ||
|
||
// ChangesetStart is called to create and initialize an iterator | ||
// to iterate through the contents of a changeset. Initially, the | ||
// iterator points to no element at all | ||
func (c *SQLiteConn) ChangesetStart() error { | ||
return nil | ||
} | ||
|
||
// ChangesetNext moves a Changeset iterator to the next change in the | ||
// changeset. | ||
func (c *SQLiteConn) ChangesetNext() error { | ||
return nil | ||
} | ||
|
||
// ChangesetOp retuns the type of change (INSERT, UPDATE or DELETE) | ||
// that the iterator points to | ||
func (c *SQLiteConn) ChangesetOp() error { | ||
return nil | ||
} | ||
|
||
// ChangesetOld may be used to obtain the old.* values within the change payload. | ||
func (c *SQLiteConn) ChangesetOld() error { | ||
return nil | ||
} | ||
|
||
// ChangesetNew may be used to obtain the new.* values within the change payload. | ||
func (c *SQLiteConn) ChangesetNew() error { | ||
return nil | ||
} | ||
|
||
// ChangesetFinalize is called to delete a changeste iterator. | ||
func (c *SQLiteConn) ChangesetFinalize() error { | ||
return nil | ||
} | ||
|