sqlite

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CompoundColumn

type CompoundColumn struct {
	STextColumn
	sqlchemy.SBaseCompoundColumn
}

CompoundColumn represents a column of compound tye, e.g. a JSON, an Array, or a struct

func NewCompoundColumn

func NewCompoundColumn(name string, tagmap map[string]string, isPointer bool) CompoundColumn

NewCompoundColumn returns an instance of CompoundColumn

func (*CompoundColumn) ConvertFromString

func (c *CompoundColumn) ConvertFromString(str string) interface{}

ConvertFromString implementation of CompoundColumn for IColumnSpec

func (*CompoundColumn) ConvertFromValue

func (c *CompoundColumn) ConvertFromValue(val interface{}) interface{}

ConvertFromValue implementation of CompoundColumn for IColumnSpec

func (*CompoundColumn) DefinitionString

func (c *CompoundColumn) DefinitionString() string

DefinitionString implementation of CompoundColumn for IColumnSpec

func (*CompoundColumn) IsZero

func (c *CompoundColumn) IsZero(val interface{}) bool

IsZero implementation of CompoundColumn for IColumnSpec

type SBooleanColumn

type SBooleanColumn struct {
	sqlchemy.SBaseColumn
}

SBooleanColumn represents a boolean type column, which is a int(1) for mysql, with value of true or false

func NewBooleanColumn

func NewBooleanColumn(name string, tagmap map[string]string, isPointer bool) SBooleanColumn

NewBooleanColumn return an instance of SBooleanColumn

func (*SBooleanColumn) ConvertFromString

func (c *SBooleanColumn) ConvertFromString(str string) interface{}

ConvertFromString implementation of SBooleanColumn for IColumnSpec

func (*SBooleanColumn) ConvertFromValue

func (c *SBooleanColumn) ConvertFromValue(val interface{}) interface{}

ConvertFromValue implementation of STristateColumn for IColumnSpec

func (*SBooleanColumn) DefinitionString

func (c *SBooleanColumn) DefinitionString() string

DefinitionString implementation of SBooleanColumn for IColumnSpec

func (*SBooleanColumn) IsZero

func (c *SBooleanColumn) IsZero(val interface{}) bool

IsZero implementation of SBooleanColumn for IColumnSpec

type SDateTimeColumn

type SDateTimeColumn struct {
	STimeTypeColumn
	// contains filtered or unexported fields
}

SDateTimeColumn represents a DateTime type of column

func NewDateTimeColumn

func NewDateTimeColumn(name string, tagmap map[string]string, isPointer bool) SDateTimeColumn

NewDateTimeColumn returns an instance of DateTime column

func (*SDateTimeColumn) IsCreatedAt

func (c *SDateTimeColumn) IsCreatedAt() bool

func (*SDateTimeColumn) IsDateTime

func (c *SDateTimeColumn) IsDateTime() bool

func (*SDateTimeColumn) IsUpdatedAt

func (c *SDateTimeColumn) IsUpdatedAt() bool

type SFloatColumn

type SFloatColumn struct {
	sqlchemy.SBaseColumn
}

SFloatColumn represents a float type column, e.g. float32 or float64

func NewFloatColumn

func NewFloatColumn(name string, tagmap map[string]string, isPointer bool) SFloatColumn

NewFloatColumn returns an instance of SFloatColumn

func (*SFloatColumn) ConvertFromString

func (c *SFloatColumn) ConvertFromString(str string) interface{}

ConvertFromString implementation of SBooleanColumn for IColumnSpec

func (*SFloatColumn) DefinitionString

func (c *SFloatColumn) DefinitionString() string

DefinitionString implementation of SFloatColumn for IColumnSpec

func (*SFloatColumn) IsNumeric

func (c *SFloatColumn) IsNumeric() bool

IsNumeric implementation of SFloatColumn for IColumnSpec

func (*SFloatColumn) IsZero

func (c *SFloatColumn) IsZero(val interface{}) bool

IsZero implementation of SFloatColumn for IColumnSpec

type SIntegerColumn

type SIntegerColumn struct {
	sqlchemy.SBaseColumn
	// contains filtered or unexported fields
}

SIntegerColumn represents an integer type of column, with value of integer

func NewIntegerColumn

func NewIntegerColumn(name string, tagmap map[string]string, isPointer bool) SIntegerColumn

NewIntegerColumn return an instance of SIntegerColumn

func (*SIntegerColumn) ConvertFromString

func (c *SIntegerColumn) ConvertFromString(str string) interface{}

ConvertFromString implementation of SBooleanColumn for IColumnSpec

func (*SIntegerColumn) DefinitionString

func (c *SIntegerColumn) DefinitionString() string

DefinitionString implementation of SIntegerColumn for IColumnSpec

func (*SIntegerColumn) IsAutoIncrement

func (c *SIntegerColumn) IsAutoIncrement() bool

func (*SIntegerColumn) IsAutoVersion

func (c *SIntegerColumn) IsAutoVersion() bool

func (*SIntegerColumn) IsNumeric

func (c *SIntegerColumn) IsNumeric() bool

IsNumeric implementation of SIntegerColumn for IColumnSpec

func (*SIntegerColumn) IsZero

func (c *SIntegerColumn) IsZero(val interface{}) bool

IsZero implementation of SIntegerColumn for IColumnSpec

func (*SIntegerColumn) SetAutoIncrement

func (c *SIntegerColumn) SetAutoIncrement(on bool)

func (*SIntegerColumn) SetAutoIncrementOffset

func (c *SIntegerColumn) SetAutoIncrementOffset(offset int64)

type SSqliteBackend

type SSqliteBackend struct {
	sqlchemy.SBaseBackend
}

func (*SSqliteBackend) CanInsert

func (sqlite *SSqliteBackend) CanInsert() bool

CanInsert returns wether the backend supports Insert

func (*SSqliteBackend) CanInsertOrUpdate

func (sqlite *SSqliteBackend) CanInsertOrUpdate() bool

CanInsertOrUpdate returns weather the backend supports InsertOrUpdate

func (*SSqliteBackend) CanUpdate

func (sqlite *SSqliteBackend) CanUpdate() bool

CanUpdate returns wether the backend supports update

func (*SSqliteBackend) CommitTableChangeSQL

func (sqlite *SSqliteBackend) CommitTableChangeSQL(ts sqlchemy.ITableSpec, changes sqlchemy.STableChanges) []string

func (*SSqliteBackend) CurrentTimeStampString added in v1.1.2

func (sqlite *SSqliteBackend) CurrentTimeStampString() string

func (*SSqliteBackend) CurrentUTCTimeStampString added in v1.1.2

func (sqlite *SSqliteBackend) CurrentUTCTimeStampString() string

func (*SSqliteBackend) DropIndexSQLTemplate

func (sqlite *SSqliteBackend) DropIndexSQLTemplate() string

func (*SSqliteBackend) FetchIndexesAndConstraints

func (sqlite *SSqliteBackend) FetchIndexesAndConstraints(ts sqlchemy.ITableSpec) ([]sqlchemy.STableIndex, []sqlchemy.STableConstraint, error)

func (*SSqliteBackend) FetchTableColumnSpecs

func (sqlite *SSqliteBackend) FetchTableColumnSpecs(ts sqlchemy.ITableSpec) ([]sqlchemy.IColumnSpec, error)

func (*SSqliteBackend) GROUP_CONCAT2 added in v1.1.2

func (sqlite *SSqliteBackend) GROUP_CONCAT2(name string, sep string, field sqlchemy.IQueryField) sqlchemy.IQueryField

GROUP_CONCAT2 represents the SQL function GROUP_CONCAT

func (*SSqliteBackend) GetColumnSpecByFieldType

func (sqlite *SSqliteBackend) GetColumnSpecByFieldType(table *sqlchemy.STableSpec, fieldType reflect.Type, fieldname string, tagmap map[string]string, isPointer bool) sqlchemy.IColumnSpec

func (*SSqliteBackend) GetCreateSQLs

func (sqlite *SSqliteBackend) GetCreateSQLs(ts sqlchemy.ITableSpec) []string

func (*SSqliteBackend) GetTableSQL

func (sqlite *SSqliteBackend) GetTableSQL() string

func (*SSqliteBackend) InsertOrUpdateSQLTemplate

func (sqlite *SSqliteBackend) InsertOrUpdateSQLTemplate() string

func (*SSqliteBackend) IsSupportIndexAndContraints

func (sqlite *SSqliteBackend) IsSupportIndexAndContraints() bool

func (*SSqliteBackend) Name

func (sqlite *SSqliteBackend) Name() sqlchemy.DBBackendName

type STextColumn

type STextColumn struct {
	sqlchemy.SBaseColumn
}

STextColumn represents a text type of column

func NewTextColumn

func NewTextColumn(name string, tagmap map[string]string, isPointer bool) STextColumn

NewTextColumn return an instance of STextColumn

func (*STextColumn) ConvertFromString

func (c *STextColumn) ConvertFromString(str string) interface{}

ConvertFromString implementation of SBooleanColumn for IColumnSpec

func (*STextColumn) DefinitionString

func (c *STextColumn) DefinitionString() string

DefinitionString implementation of STextColumn for IColumnSpec

func (*STextColumn) IsAscii

func (c *STextColumn) IsAscii() bool

IsAscii implementation of STextColumn for IColumnSpec

func (*STextColumn) IsSearchable

func (c *STextColumn) IsSearchable() bool

IsSearchable implementation of STextColumn for IColumnSpec

func (*STextColumn) IsString

func (c *STextColumn) IsString() bool

func (*STextColumn) IsText

func (c *STextColumn) IsText() bool

IsText implementation of STextColumn for IColumnSpec

func (*STextColumn) IsZero

func (c *STextColumn) IsZero(val interface{}) bool

IsZero implementation of STextColumn for IColumnSpec

type STimeTypeColumn

type STimeTypeColumn struct {
	sqlchemy.SBaseColumn
}

STimeTypeColumn represents a Detetime type of column, e.g. DateTime

func NewTimeTypeColumn

func NewTimeTypeColumn(name string, tagmap map[string]string, isPointer bool) STimeTypeColumn

NewTimeTypeColumn return an instance of STimeTypeColumn

func (*STimeTypeColumn) ConvertFromString

func (c *STimeTypeColumn) ConvertFromString(str string) interface{}

ConvertFromString implementation of SBooleanColumn for IColumnSpec

func (*STimeTypeColumn) DefinitionString

func (c *STimeTypeColumn) DefinitionString() string

DefinitionString implementation of STimeTypeColumn for IColumnSpec

func (*STimeTypeColumn) IsText

func (c *STimeTypeColumn) IsText() bool

IsText implementation of STimeTypeColumn for IColumnSpec

func (*STimeTypeColumn) IsZero

func (c *STimeTypeColumn) IsZero(val interface{}) bool

IsZero implementation of STimeTypeColumn for IColumnSpec

type STristateColumn

type STristateColumn struct {
	sqlchemy.SBaseColumn
}

STristateColumn represents a tristate type column, with value of true, false or none

func NewTristateColumn

func NewTristateColumn(table, name string, tagmap map[string]string, isPointer bool) STristateColumn

NewTristateColumn return an instance of STristateColumn

func (*STristateColumn) ConvertFromString

func (c *STristateColumn) ConvertFromString(str string) interface{}

ConvertFromString implementation of STristateColumn for IColumnSpec

func (*STristateColumn) ConvertFromValue

func (c *STristateColumn) ConvertFromValue(val interface{}) interface{}

ConvertFromValue implementation of STristateColumn for IColumnSpec

func (*STristateColumn) DefinitionString

func (c *STristateColumn) DefinitionString() string

DefinitionString implementation of STristateColumn for IColumnSpec

func (*STristateColumn) IsZero

func (c *STristateColumn) IsZero(val interface{}) bool

IsZero implementation of STristateColumn for IColumnSpec

Jump to

Keyboard shortcuts

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