Documentation
¶
Index ¶
- func NewExecutor(dialectType database.SQLDialectType) (database.SQL, error)
- type Executor
- func (e *Executor) Close(_ context.Context) error
- func (e *Executor) Dialect() database.SQLDialect
- func (e *Executor) IsClosed() bool
- func (e *Executor) Open(ctx context.Context) error
- func (e *Executor) Ping(ctx context.Context) error
- func (e *Executor) Request(ctx context.Context, request database.Request) (any, error)
- func (e *Executor) Type() database.Type
- type Keyword
- type Prefab
- type QueryPrefab
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewExecutor ¶
func NewExecutor(dialectType database.SQLDialectType) (database.SQL, error)
Types ¶
type Executor ¶
type Executor struct {
// contains filtered or unexported fields
}
func (*Executor) Dialect ¶
func (e *Executor) Dialect() database.SQLDialect
type Keyword ¶
type Keyword int
const ( Select Keyword = iota // SELECT Insert // INSERT Update // UPDATE Delete // DELETE From // FROM Where // WHERE Set // SET Values // VALUES OrderBy // ORDER BY Asc // ASC Desc // DESC Limit // LIMIT Offset // OFFSET GroupBy // GROUP BY Having // HAVING Join // JOIN LeftJoin // LEFT JOIN RightJoin // RIGHT JOIN FullJoin // FULL JOIN CrossJoin // CROSS JOIN On // ON As // AS InnerJoin // INNER JOIN OuterJoin // OUTER JOIN Union // UNION Intersect // INTERSECT Except // EXCEPT UnionAll // UNION ALL IntersectAll // INTERSECT ALL ExceptAll // EXCEPT ALL Not // NOT In // IN Between // BETWEEN And // AND Or // OR IsNull // IS NULL IsNotNull // IS NOT NULL IsTrue // IS TRUE IsFalse // IS FALSE IsUnknown // IS UNKNOWN IsDistinctFrom // IS DISTINCT FROM IsNotDistinctFrom // IS NOT DISTINCT FROM Like // LIKE NotLike // NOT LIKE Ilike // ILIKE NotIlike // NOT ILIKE Any // ANY All // ALL Exists // EXISTS Some // SOME Unique // UNIQUE PrimaryKey // PRIMARY KEY ForeignKey // FOREIGN KEY Check // CHECK Default // DEFAULT Null // NULL True // TRUE False // FALSE Unknown // UNKNOWN Call // CALL Exec // EXEC Execute // EXECUTE Pragma // PRAGMA )
type Prefab ¶
type Prefab struct {
CurrentDatabase database.Request
Databases database.Request
Tables database.Request
Columns func(tableName string) database.Request
}
func CreateMsSQLPrefabs ¶
func CreateMsSQLPrefabs() *Prefab
func CreateMySQLPrefabs ¶
func CreateMySQLPrefabs() *Prefab
func CreateOraclePrefabs ¶
func CreateOraclePrefabs() *Prefab
func CreatePostgresPrefabs ¶
func CreatePostgresPrefabs() *Prefab
func CreateSQLServerPrefabs ¶
func CreateSQLServerPrefabs() *Prefab
func CreateSQLitePrefabs ¶
func CreateSQLitePrefabs() *Prefab
type QueryPrefab ¶
type QueryPrefab struct {
Postgres *Prefab
MySQL *Prefab
SQLite3 *Prefab
MsSQL *Prefab
Oracle *Prefab
SQLServer *Prefab
}
var Prefabs *QueryPrefab = CreateQueryPrefabs()
func CreateQueryPrefabs ¶
func CreateQueryPrefabs() *QueryPrefab
Click to show internal directories.
Click to hide internal directories.