Skip to content

Commit

Permalink
Add stubbed out support for Sessions
Browse files Browse the repository at this point in the history
  • Loading branch information
otoolep committed Jan 11, 2025
1 parent 99e127f commit ace7977
Showing 1 changed file with 74 additions and 0 deletions.
74 changes: 74 additions & 0 deletions sqlite3_session.go
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
}

0 comments on commit ace7977

Please sign in to comment.