Documentation
¶
Index ¶
- Constants
- func NewParser() sql.Parser
- type AggregateFunction
- type AggregateResultSet
- type AlterDatabase
- type AlterTable
- type AndExpr
- type Begin
- type BindParam
- type CmpExpr
- type Column
- type ColumnDefFlag
- type Columns
- type Commit
- type Condition
- type Constraint
- type Copy
- type CreateDatabase
- type CreateIndex
- type CreateTable
- type DataType
- type Delete
- type DropDatabase
- type DropIndex
- type DropTable
- type Expr
- type FieldType
- type Function
- type FunctionExecutor
- type Index
- type Indexes
- type Insert
- type OrExpr
- type ResultSet
- type ResultSetColumn
- type ResultSetRow
- type ResultSetSchema
- type Rollback
- type SQLExecutor
- type Schema
- type Select
- type SelectOption
- type Selector
- type Selectors
- type Statement
- type StatementType
- type Table
- type TableList
- type Truncate
- type Update
- type Use
- type Vacuum
Constants ¶
View Source
const ( EQ = query.EQ NEQ = query.NEQ LT = query.LT LE = query.LE GT = query.GT GE = query.GE IN = query.IN NIN = query.NIN )
View Source
const ( BigIntData = query.BigIntData BinaryData = query.BinaryData BitData = query.BitData BlobData = query.BlobData BooleanData = query.BooleanData CharData = query.CharData CharacterData = query.CharacterData ClobData = query.ClobData DateData = query.DateData DateTimeData = query.DateTimeData DecimalData = query.DecimalData DoubleData = query.DoubleData DoublePrecision = query.DoublePrecision FloatData = query.FloatData IntData = query.IntData IntegerData = query.IntegerData LongBlobData = query.LongBlobData LongTextData = query.LongTextData MediumBlobData = query.MediumBlobData MediumIntData = query.MediumIntData MediumTextData = query.MediumTextData NumericData = query.NumericData RealData = query.RealData SetData = query.SetData SmallIntData = query.SmallIntData TextData = query.TextData TimeData = query.TimeData TimeStampData = query.TimeStampData TinyBlobData = query.TinyBlobData TinyIntData = query.TinyIntData TinyTextData = query.TinyTextData VarBinaryData = query.VarBinaryData VarCharData = query.VarCharData VarCharacterData = query.VarCharacterData YearData = query.YearData )
View Source
const ( // MySQLTypeDecimal represents a MYSQL_TYPE_DECIMAL type. MySQLTypeDecimal FieldType = iota // MySQLTypeTiny represents a MYSQL_TYPE_TINYINT type. MySQLTypeTiny // MySQLTypeShort represents a MYSQL_TYPE_SMALLINT type. MySQLTypeShort // MySQLTypeLong represents an INT type. MySQLTypeLong // MySQLTypeFloat represents a MYSQL_TYPE_FLOAT type. MySQLTypeFloat // MySQLTypeDouble represents a MYSQL_TYPE_DOUBLE type. MySQLTypeDouble // MySQLTypeNull represents a MYSQL_TYPE_NULL type. MySQLTypeNull // MySQLTypeTimestamp represents a MYSQL_TYPE_TIMESTAMP type. MySQLTypeTimestamp // MySQLTypeLongLong represents a MYSQL_TYPE_BIGINT type. MySQLTypeLongLong // MySQLTypeInt24 represents a MYSQL_TYPE_MEDIUMINT type. MySQLTypeInt24 // MySQLTypeDate represents a MYSQL_TYPE_DATE type. MySQLTypeDate // MySQLTypeTime represents a MYSQL_TYPE_TIME type. MySQLTypeTime // MySQLTypeDatetime represents a MYSQL_TYPE_DATETIME type. MySQLTypeDatetime // MySQLTypeYear represents a MYSQL_TYPE_YEAR type. MySQLTypeYear // MySQLTypeNewdate represents a MYSQL_TYPE_NEWDATE type. MySQLTypeNewdate // MySQLTypeVarchar represents a MYSQL_TYPE_VARCHAR type. MySQLTypeVarchar // MySQLTypeBit represents a MYSQL_TYPE_BIT type. MySQLTypeBit // MySQLTypeTimestamp2 represents a MYSQL_TYPE_TIMESTAMP2 type. MySQLTypeTimestamp2 // MySQLTypeDatetime2 represents a MYSQL_TYPE_DATETIME2 type. MySQLTypeDatetime2 // MySQLTypeTime2 represents a MYSQL_TYPE_TIME2 type. MySQLTypeTime2 // MySQLTypeTypedArray represents a MYSQL_TYPE_TYPED_ARRAY type. MySQLTypeTypedArray // MySQLTypeVector represents a MYSQL_TYPE_VECTOR type. MySQLTypeVector = 242 // MySQLTypeInvalid represents an INVALID type. MySQLTypeInvalid = 243 // MySQLTypeBool represents a MYSQL_TYPE_BOOL type. MySQLTypeBool = 244 // MySQLTypeJSON represents a MYSQL_TYPE_JSON type. MySQLTypeJSON = 245 // MySQLTypeNewdecimal represents a MYSQL_TYPE_NEWDECIMAL type. MySQLTypeNewdecimal = 246 // MySQLTypeEnum represents an ENUM type. MySQLTypeEnum = 247 // MySQLTypeSet represents a MYSQL_TYPE_SET type. MySQLTypeSet = 248 // MySQLTypeTinyBlob represents a MYSQL_TYPE_TINYBLOB type. MySQLTypeTinyBlob = 249 // MySQLTypeMediumBlob represents a MYSQL_TYPE_MEDIUMBLOB type. MySQLTypeMediumBlob = 250 // MySQLTypeLongBlob represents a MYSQL_TYPE_LONGBLOB type. MySQLTypeLongBlob = 251 // MySQLTypeBlob represents a MYSQL_TYPE_BLOB type. MySQLTypeBlob = 252 // MySQLTypeVarString represents a MYSQL_TYPE_VAR_STRING type. MySQLTypeVarString = 253 // MySQLTypeString represents a MYSQL_TYPE_STRING type. MySQLTypeString = 254 // MySQLTypeGeometry represents a MYSQL_TYPE_GEOMETRY type. MySQLTypeGeometry = 255 )
View Source
const ( CreateDatabaseStatement = query.CreateDatabaseStatement CreateTableStatement = query.CreateTableStatement CreateIndexStatement = query.CreateIndexStatement InsertStatement = query.InsertStatement SelectStatement = query.SelectStatement UpdateStatement = query.UpdateStatement DeleteStatement = query.DeleteStatement DropDatabaseStatement = query.DropDatabaseStatement DropTableStatement = query.DropTableStatement DropIndexStatement = query.DropIndexStatement AlterDatabaseStatement = query.AlterDatabaseStatement AlterTableStatement = query.AlterTableStatement AlterIndexStatement = query.AlterIndexStatement CopyStatement = query.CopyStatement CommitStatement = query.CommitStatement VacuumStatement = query.VacuumStatement TruncateStatement = query.TruncateStatement BeginStatement = query.BeginStatement RollbackStatement = query.RollbackStatement UseStatement = query.UseStatement )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AggregateFunction ¶ added in v1.1.0
type AggregateFunction = query.AggregateFunction
AggregateFunction represents an aggregate function.
type AggregateResultSet ¶ added in v1.1.0
type AggregateResultSet = query.AggregateResultSet
AggregateResultSet represents an aggregate result set.
type AlterDatabase ¶ added in v1.1.0
type AlterDatabase = sql.AlterDatabase
type AlterTable ¶ added in v1.1.0
type AlterTable = sql.AlterTable
type ColumnDefFlag ¶ added in v1.1.0
type ColumnDefFlag = uint16
ColumnDefFlag represents a MySQL column definition flag.
const ( NotNullFlag ColumnDefFlag = 1 PriKeyFlag ColumnDefFlag = 2 UniqueKeyFlag ColumnDefFlag = 4 MultipleKeyFlag ColumnDefFlag = 8 BlobFlag ColumnDefFlag = 16 UnsignedFlag ColumnDefFlag = 32 ZerofillFlag ColumnDefFlag = 64 BinaryFlag ColumnDefFlag = 128 EnumFlag ColumnDefFlag = 256 AutoIncrementFlag ColumnDefFlag = 512 TimestampFlag ColumnDefFlag = 1024 SetFlag ColumnDefFlag = 2048 NoDefaultValueFlag ColumnDefFlag = 4096 OnUpdateNowFlag ColumnDefFlag = 8192 NumFlag ColumnDefFlag = 32768 PartKeyFlag ColumnDefFlag = 16384 GroupFlag ColumnDefFlag = 32768 )
func NewColumnDefFlagFrom ¶ added in v1.1.0
func NewColumnDefFlagFrom(c query.Constraint) (ColumnDefFlag, error)
NewColumnDefFlagFrom converts a given Constraint into a ColumnDefFlag.
type Constraint ¶ added in v1.1.0
type Constraint = query.Constraint
type CreateDatabase ¶ added in v1.1.0
type CreateDatabase = sql.CreateDatabase
type CreateIndex ¶ added in v1.1.2
type CreateIndex = sql.CreateIndex
type CreateTable ¶ added in v1.1.0
type CreateTable = sql.CreateTable
type DropDatabase ¶ added in v1.1.0
type DropDatabase = sql.DropDatabase
type FieldType ¶ added in v1.1.0
type FieldType uint8
FieldType represents a field type.
func NewFieldTypeFrom ¶ added in v1.1.0
NewFieldTypeFrom returns a new FieldType from the data type.
type FunctionExecutor ¶ added in v1.1.0
type FunctionExecutor = query.FunctionExecutor
FunctionExecutor represents a function executor.
type ResultSet ¶ added in v1.1.0
type ResultSet interface { ResultSetSchema // Row returns the current row. Row() ResultSetRow // Schema returns the schema. Schema() ResultSetSchema // RowsAffected returns the number of rows affected. RowsAffected() uint64 // Next returns the next row. Next() bool // Close closes the resultset. Close() error }
ResultSet represents a response resultset interface.
type ResultSetColumn ¶ added in v1.1.0
type ResultSetColumn interface { // Name returns the column name. Name() string // Type returns the data type. Type() DataType // Constraint returns the column constraint. Constraint() Constraint }
ResultSetColumn represents a column interface in a resultset.
type ResultSetRow ¶ added in v1.1.0
type ResultSetRow interface { // Values returns the all values. Values() []any // ValueAt returns the value at the specified index. ValueAt(int) (any, error) // Scan scans the values. Scan(...any) error // ScanAt scans the value at the specified index. ScanAt(int, any) error }
ResultSetRow represents a row interface.
type ResultSetSchema ¶ added in v1.1.0
type ResultSetSchema interface { // DatabaseName returns the database name. DatabaseName() string // TableName returns the table name. TableName() string // Columns returns the columns. Columns() []ResultSetColumn }
ResultSetSchema represents a schema interface in a resultset.
type SQLExecutor ¶ added in v1.1.0
SQLExecutor represents a frontend message executor.
type SelectOption ¶ added in v1.1.0
type SelectOption = query.SelectOption
type StatementType ¶
type StatementType = query.StatementType
Click to show internal directories.
Click to hide internal directories.