Skip to content

Commit ace7977

Browse files
committed
Add stubbed out support for Sessions
1 parent 99e127f commit ace7977

File tree

1 file changed

+74
-0
lines changed

1 file changed

+74
-0
lines changed

sqlite3_session.go

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
//go:build !sqlite_omit_session
2+
// +build !sqlite_omit_session
3+
4+
package sqlite3
5+
6+
/*
7+
#cgo CFLAGS: -DSQLITE_ENABLE_SESSION -DSQLITE_ENABLE_PREUPDATE_HOOK
8+
#cgo LDFLAGS: -lm
9+
*/
10+
11+
/*
12+
#ifndef USE_LIBSQLITE3
13+
#include "sqlite3-binding.h"
14+
#else
15+
#include <sqlite3.h>
16+
#endif
17+
#include <stdlib.h>
18+
*/
19+
import "C"
20+
21+
// CreateSession creates a new session object.
22+
func (c *SQLiteConn) CreateSession() error {
23+
return nil
24+
}
25+
26+
// AttachSession attaches a session object to a set of tables.
27+
func (c *SQLiteConn) AttachSession() error {
28+
return nil
29+
}
30+
31+
// DetachSession deletes a session object.
32+
func (c *SQLiteConn) DeleteSession() error {
33+
return nil
34+
}
35+
36+
// SessionChangeset generates a changeset from a session object.
37+
func (c *SQLiteConn) Changeset() error {
38+
return nil
39+
}
40+
41+
// ChangesetStart is called to create and initialize an iterator
42+
// to iterate through the contents of a changeset. Initially, the
43+
// iterator points to no element at all
44+
func (c *SQLiteConn) ChangesetStart() error {
45+
return nil
46+
}
47+
48+
// ChangesetNext moves a Changeset iterator to the next change in the
49+
// changeset.
50+
func (c *SQLiteConn) ChangesetNext() error {
51+
return nil
52+
}
53+
54+
// ChangesetOp retuns the type of change (INSERT, UPDATE or DELETE)
55+
// that the iterator points to
56+
func (c *SQLiteConn) ChangesetOp() error {
57+
return nil
58+
}
59+
60+
// ChangesetOld may be used to obtain the old.* values within the change payload.
61+
func (c *SQLiteConn) ChangesetOld() error {
62+
return nil
63+
}
64+
65+
// ChangesetNew may be used to obtain the new.* values within the change payload.
66+
func (c *SQLiteConn) ChangesetNew() error {
67+
return nil
68+
}
69+
70+
// ChangesetFinalize is called to delete a changeste iterator.
71+
func (c *SQLiteConn) ChangesetFinalize() error {
72+
return nil
73+
}
74+

0 commit comments

Comments
 (0)