paged_scalar

package
v0.0.0-...-06e4aab Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 18, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	WrapErr     = func(err *Error) error { return err }
	Logger      func(format string, args ...any)
	ShouldRetry func(driver string, err error) bool
)
View Source
var SQLite3JournalMode = "WAL"

SQLite3JournalMode controls the journal_mode pragma for all new connections. Since it is read without a mutex, it must be changed to the value you want before any Open calls.

Functions

func DeleteAll

func DeleteAll(ctx context.Context, db *DB) (int64, error)

Types

type DB

type DB struct {
	*sql.DB

	Hooks struct {
		Now func() time.Time
	}
	// contains filtered or unexported fields
}

func Open

func Open(driver, source string) (db *DB, err error)

func (*DB) Close

func (obj *DB) Close() (err error)

func (*DB) Open

func (obj *DB) Open(ctx context.Context) (*Tx, error)

type DBMethods

type DBMethods interface {
	Methods

	Schema() []string
	DropSchema() []string

	Rebind(sql string) string
}

type DataBlob

type DataBlob struct {
	Id []byte
}

type DataBlob_Id_Field

type DataBlob_Id_Field struct {
	// contains filtered or unexported fields
}

func DataBlob_Id

func DataBlob_Id(v []byte) DataBlob_Id_Field

type DataBlob_Update_Fields

type DataBlob_Update_Fields struct {
}

type DataDate

type DataDate struct {
	Id time.Time
}

type DataDate_Id_Field

type DataDate_Id_Field struct {
	// contains filtered or unexported fields
}

func DataDate_Id

func DataDate_Id(v time.Time) DataDate_Id_Field

type DataDate_Update_Fields

type DataDate_Update_Fields struct {
}

type DataFloat

type DataFloat struct {
	Id float32
}

type DataFloat64

type DataFloat64 struct {
	Id float64
}

type DataFloat64_Id_Field

type DataFloat64_Id_Field struct {
	// contains filtered or unexported fields
}

func DataFloat64_Id

func DataFloat64_Id(v float64) DataFloat64_Id_Field

type DataFloat64_Update_Fields

type DataFloat64_Update_Fields struct {
}

type DataFloat_Id_Field

type DataFloat_Id_Field struct {
	// contains filtered or unexported fields
}

func DataFloat_Id

func DataFloat_Id(v float32) DataFloat_Id_Field

type DataFloat_Update_Fields

type DataFloat_Update_Fields struct {
}

type DataInt

type DataInt struct {
	Id int
}

type DataInt64

type DataInt64 struct {
	Id int64
}

type DataInt64_Id_Field

type DataInt64_Id_Field struct {
	// contains filtered or unexported fields
}

func DataInt64_Id

func DataInt64_Id(v int64) DataInt64_Id_Field

type DataInt64_Update_Fields

type DataInt64_Update_Fields struct {
}

type DataInt_Id_Field

type DataInt_Id_Field struct {
	// contains filtered or unexported fields
}

func DataInt_Id

func DataInt_Id(v int) DataInt_Id_Field

type DataInt_Update_Fields

type DataInt_Update_Fields struct {
}

type DataJson

type DataJson struct {
	Id []byte
}

type DataJson_Id_Field

type DataJson_Id_Field struct {
	// contains filtered or unexported fields
}

func DataJson_Id

func DataJson_Id(v []byte) DataJson_Id_Field

type DataJson_Update_Fields

type DataJson_Update_Fields struct {
}

type DataSerial

type DataSerial struct {
	Id int
}

type DataSerial64

type DataSerial64 struct {
	Id int64
}

type DataSerial64_Id_Field

type DataSerial64_Id_Field struct {
	// contains filtered or unexported fields
}

func DataSerial64_Id

func DataSerial64_Id(v int64) DataSerial64_Id_Field

type DataSerial64_Update_Fields

type DataSerial64_Update_Fields struct {
}

type DataSerial_Id_Field

type DataSerial_Id_Field struct {
	// contains filtered or unexported fields
}

func DataSerial_Id

func DataSerial_Id(v int) DataSerial_Id_Field

type DataSerial_Update_Fields

type DataSerial_Update_Fields struct {
}

type DataText

type DataText struct {
	Id string
}

type DataText_Id_Field

type DataText_Id_Field struct {
	// contains filtered or unexported fields
}

func DataText_Id

func DataText_Id(v string) DataText_Id_Field

type DataText_Update_Fields

type DataText_Update_Fields struct {
}

type DataTimestamp

type DataTimestamp struct {
	Id time.Time
}

type DataTimestamp_Id_Field

type DataTimestamp_Id_Field struct {
	// contains filtered or unexported fields
}

func DataTimestamp_Id

func DataTimestamp_Id(v time.Time) DataTimestamp_Id_Field

type DataTimestamp_Update_Fields

type DataTimestamp_Update_Fields struct {
}

type DataUint

type DataUint struct {
	Id uint
}

type DataUint64

type DataUint64 struct {
	Id uint64
}

type DataUint64_Id_Field

type DataUint64_Id_Field struct {
	// contains filtered or unexported fields
}

func DataUint64_Id

func DataUint64_Id(v uint64) DataUint64_Id_Field

type DataUint64_Update_Fields

type DataUint64_Update_Fields struct {
}

type DataUint_Id_Field

type DataUint_Id_Field struct {
	// contains filtered or unexported fields
}

func DataUint_Id

func DataUint_Id(v uint) DataUint_Id_Field

type DataUint_Update_Fields

type DataUint_Update_Fields struct {
}

type DataUtimestamp

type DataUtimestamp struct {
	Id time.Time
}

type DataUtimestamp_Id_Field

type DataUtimestamp_Id_Field struct {
	// contains filtered or unexported fields
}

func DataUtimestamp_Id

func DataUtimestamp_Id(v time.Time) DataUtimestamp_Id_Field

type DataUtimestamp_Update_Fields

type DataUtimestamp_Update_Fields struct {
}

type Error

type Error struct {
	Err         error
	Code        ErrorCode
	Driver      string
	Constraint  string
	QuerySuffix string
}

func (*Error) Error

func (e *Error) Error() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

type ErrorCode

type ErrorCode int
const (
	ErrorCode_Unknown ErrorCode = iota
	ErrorCode_UnsupportedDriver
	ErrorCode_NoRows
	ErrorCode_TxDone
	ErrorCode_TooManyRows
	ErrorCode_ConstraintViolation
	ErrorCode_EmptyUpdate
)

type Methods

type Methods interface {
	Create_DataBlob(ctx context.Context,
		data_blob_id DataBlob_Id_Field) (
		data_blob *DataBlob, err error)

	Create_DataDate(ctx context.Context,
		data_date_id DataDate_Id_Field) (
		data_date *DataDate, err error)

	Create_DataFloat(ctx context.Context,
		data_float_id DataFloat_Id_Field) (
		data_float *DataFloat, err error)

	Create_DataFloat64(ctx context.Context,
		data_float64_id DataFloat64_Id_Field) (
		data_float64 *DataFloat64, err error)

	Create_DataInt(ctx context.Context,
		data_int_id DataInt_Id_Field) (
		data_int *DataInt, err error)

	Create_DataInt64(ctx context.Context,
		data_int64_id DataInt64_Id_Field) (
		data_int64 *DataInt64, err error)

	Create_DataJson(ctx context.Context,
		data_json_id DataJson_Id_Field) (
		data_json *DataJson, err error)

	Create_DataSerial(ctx context.Context) (
		data_serial *DataSerial, err error)

	Create_DataSerial64(ctx context.Context) (
		data_serial64 *DataSerial64, err error)

	Create_DataText(ctx context.Context,
		data_text_id DataText_Id_Field) (
		data_text *DataText, err error)

	Create_DataTimestamp(ctx context.Context,
		data_timestamp_id DataTimestamp_Id_Field) (
		data_timestamp *DataTimestamp, err error)

	Create_DataUint(ctx context.Context,
		data_uint_id DataUint_Id_Field) (
		data_uint *DataUint, err error)

	Create_DataUint64(ctx context.Context,
		data_uint64_id DataUint64_Id_Field) (
		data_uint64 *DataUint64, err error)

	Create_DataUtimestamp(ctx context.Context,
		data_utimestamp_id DataUtimestamp_Id_Field) (
		data_utimestamp *DataUtimestamp, err error)

	Paged_DataBlob(ctx context.Context,
		limit int, start *Paged_DataBlob_Continuation) (
		rows []*DataBlob, next *Paged_DataBlob_Continuation, err error)

	Paged_DataDate(ctx context.Context,
		limit int, start *Paged_DataDate_Continuation) (
		rows []*DataDate, next *Paged_DataDate_Continuation, err error)

	Paged_DataFloat(ctx context.Context,
		limit int, start *Paged_DataFloat_Continuation) (
		rows []*DataFloat, next *Paged_DataFloat_Continuation, err error)

	Paged_DataFloat64(ctx context.Context,
		limit int, start *Paged_DataFloat64_Continuation) (
		rows []*DataFloat64, next *Paged_DataFloat64_Continuation, err error)

	Paged_DataInt(ctx context.Context,
		limit int, start *Paged_DataInt_Continuation) (
		rows []*DataInt, next *Paged_DataInt_Continuation, err error)

	Paged_DataInt64(ctx context.Context,
		limit int, start *Paged_DataInt64_Continuation) (
		rows []*DataInt64, next *Paged_DataInt64_Continuation, err error)

	Paged_DataJson(ctx context.Context,
		limit int, start *Paged_DataJson_Continuation) (
		rows []*DataJson, next *Paged_DataJson_Continuation, err error)

	Paged_DataSerial(ctx context.Context,
		limit int, start *Paged_DataSerial_Continuation) (
		rows []*DataSerial, next *Paged_DataSerial_Continuation, err error)

	Paged_DataSerial64(ctx context.Context,
		limit int, start *Paged_DataSerial64_Continuation) (
		rows []*DataSerial64, next *Paged_DataSerial64_Continuation, err error)

	Paged_DataText(ctx context.Context,
		limit int, start *Paged_DataText_Continuation) (
		rows []*DataText, next *Paged_DataText_Continuation, err error)

	Paged_DataTimestamp(ctx context.Context,
		limit int, start *Paged_DataTimestamp_Continuation) (
		rows []*DataTimestamp, next *Paged_DataTimestamp_Continuation, err error)

	Paged_DataUint(ctx context.Context,
		limit int, start *Paged_DataUint_Continuation) (
		rows []*DataUint, next *Paged_DataUint_Continuation, err error)

	Paged_DataUint64(ctx context.Context,
		limit int, start *Paged_DataUint64_Continuation) (
		rows []*DataUint64, next *Paged_DataUint64_Continuation, err error)

	Paged_DataUtimestamp(ctx context.Context,
		limit int, start *Paged_DataUtimestamp_Continuation) (
		rows []*DataUtimestamp, next *Paged_DataUtimestamp_Continuation, err error)
}

type Paged_DataBlob_Continuation

type Paged_DataBlob_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataDate_Continuation

type Paged_DataDate_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataFloat64_Continuation

type Paged_DataFloat64_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataFloat_Continuation

type Paged_DataFloat_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataInt64_Continuation

type Paged_DataInt64_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataInt_Continuation

type Paged_DataInt_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataJson_Continuation

type Paged_DataJson_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataSerial64_Continuation

type Paged_DataSerial64_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataSerial_Continuation

type Paged_DataSerial_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataText_Continuation

type Paged_DataText_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataTimestamp_Continuation

type Paged_DataTimestamp_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataUint64_Continuation

type Paged_DataUint64_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataUint_Continuation

type Paged_DataUint_Continuation struct {
	// contains filtered or unexported fields
}

type Paged_DataUtimestamp_Continuation

type Paged_DataUtimestamp_Continuation struct {
	// contains filtered or unexported fields
}

type Tx

type Tx struct {
	Tx *sql.Tx
	// contains filtered or unexported fields
}

func (*Tx) ExecContext

func (tx *Tx) ExecContext(ctx context.Context, query string, args ...any) (sql.Result, error)

func (*Tx) QueryContext

func (tx *Tx) QueryContext(ctx context.Context, query string, args ...any) (*sql.Rows, error)

func (*Tx) QueryRowContext

func (tx *Tx) QueryRowContext(ctx context.Context, query string, args ...any) *sql.Row

type TxMethods

type TxMethods interface {
	Methods

	Rebind(s string) string
	Commit() error
	Rollback() error
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL