projection_name_clash

package
v0.0.0-...-289d480 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 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)
)
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 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 {
	All_T1_T2_Id_T3_Id(ctx context.Context) (
		rows []*T1_T2_Id_T3_Id_Row, err error)
}

type T1

type T1 struct {
	Id int64
}

type T1_Id_Field

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

func T1_Id

func T1_Id(v int64) T1_Id_Field

type T1_T2_Id_T3_Id_Row

type T1_T2_Id_T3_Id_Row struct {
	T1    T1
	T2_Id int64
	T3_Id int64
}

type T1_Update_Fields

type T1_Update_Fields struct {
}

type T2

type T2 struct {
	Id int64
}

type T2_Id_Field

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

func T2_Id

func T2_Id(v int64) T2_Id_Field

type T2_Update_Fields

type T2_Update_Fields struct {
}

type T3

type T3 struct {
	Id int64
}

type T3_Id_Field

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

func T3_Id

func T3_Id(v int64) T3_Id_Field

type T3_Update_Fields

type T3_Update_Fields struct {
}

type Tx

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

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