sql_templates

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	MysqlDialect     = "mysql"
	PostgresDialect  = "postgres"
	SqlserverDialect = "sqlserver"
	SqliteDialect    = "sqlite3"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Sql

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

Sql ...

func NewSql

func NewSql(dialect SqlDialect, lowercase bool) *Sql

NewSql ...

func (Sql) AlterTableAddColumnAfterStm

func (s Sql) AlterTableAddColumnAfterStm() string

AlterTableAddColumnAfterStm ...

func (Sql) AlterTableAddColumnFirstStm

func (s Sql) AlterTableAddColumnFirstStm() string

AlterTableAddColumnFirstStm ...

func (Sql) AlterTableDropColumnStm

func (s Sql) AlterTableDropColumnStm() string

AlterTableDropColumnStm ...

func (Sql) AlterTableModifyColumnStm

func (s Sql) AlterTableModifyColumnStm() string

AlterTableModifyColumnStm ...

func (Sql) AlterTableRenameColumnStm

func (s Sql) AlterTableRenameColumnStm() string

AlterTableRenameColumnStm ...

func (Sql) AlterTableRenameIndexStm

func (s Sql) AlterTableRenameIndexStm() string

AlterTableRenameIndexStm ...

func (Sql) AutoIncrementOption

func (s Sql) AutoIncrementOption() string

AutoIncrementOption ...

func (Sql) BigIntType

func (s Sql) BigIntType() string

BigIntType ...

func (Sql) BooleanType

func (s Sql) BooleanType() string

BooleanType ...

func (Sql) Comment

func (s Sql) Comment() string

NullValue ...

func (Sql) CreateForeignKeyStm

func (s Sql) CreateForeignKeyStm() string

CreateForeignKeyStm ...

func (Sql) CreateIndexStm

func (s Sql) CreateIndexStm(indexType string) string

CreateIndexStm ...

func (Sql) CreatePrimaryKeyStm

func (s Sql) CreatePrimaryKeyStm() string

CreatePrimaryKeyStm ...

func (Sql) CreateTableMigration

func (s Sql) CreateTableMigration() string

CreateTableMigration ...

func (Sql) CreateTableStm

func (s Sql) CreateTableStm() string

CreateTableStm ...

func (Sql) CreateUniqueIndexStm

func (s Sql) CreateUniqueIndexStm(indexType string) string

CreateUniqueIndexStm ...

func (Sql) DatetimeType

func (s Sql) DatetimeType() string

DatetimeType ...

func (Sql) DefaultOption

func (s Sql) DefaultOption() string

DefaultOption ...

func (Sql) DoubleType

func (s Sql) DoubleType() string

DoubleType ...

func (Sql) DropForeignKeyStm

func (s Sql) DropForeignKeyStm() string

DropForeignKeyStm ...

func (Sql) DropIndexStm

func (s Sql) DropIndexStm() string

DropIndexStm ...

func (Sql) DropPrimaryKeyStm

func (s Sql) DropPrimaryKeyStm() string

DropPrimaryKeyStm ...

func (Sql) DropTableMigration

func (s Sql) DropTableMigration() string

DropTableMigration ...

func (Sql) DropTableStm

func (s Sql) DropTableStm() string

DropTableStm ...

func (Sql) FamilyName

func (s Sql) FamilyName(f int32) string

FamilyName ...

func (Sql) FloatType

func (s Sql) FloatType() string

FloatType ...

func (Sql) GetDialect

func (s Sql) GetDialect() SqlDialect

GetDialect ...

func (Sql) InsertMigrationVersion

func (s Sql) InsertMigrationVersion() string

InsertMigrationVersion ...

func (Sql) IntType

func (s Sql) IntType() string

IntType ...

func (Sql) IsLowercase

func (s Sql) IsLowercase() bool

IsLowercase ...

func (Sql) IsMysql

func (s Sql) IsMysql() bool

IsMysql ...

func (Sql) IsPostgres

func (s Sql) IsPostgres() bool

IsPostgres ...

func (Sql) IsSqlite

func (s Sql) IsSqlite() bool

IsSqlite ...

func (Sql) IsSqlserver

func (s Sql) IsSqlserver() bool

IsSqlserver ...

func (Sql) NotNullValue

func (s Sql) NotNullValue() string

NotNullValue ...

func (Sql) NullValue

func (s Sql) NullValue() string

NullValue ...

func (Sql) PointerType

func (s Sql) PointerType() string

PointerType ...

func (Sql) PrimaryOption

func (s Sql) PrimaryOption() string

PrimaryOption ...

func (Sql) RenameTableStm

func (s Sql) RenameTableStm() string

RenameTableStm ...

func (Sql) RollbackMigrationVersion

func (s Sql) RollbackMigrationVersion() string

RollbackMigrationVersion ...

func (Sql) SmallIntType

func (s Sql) SmallIntType() string

SmallIntType ...

func (Sql) TextType

func (s Sql) TextType() string

TextType ...

func (Sql) TinyIntType

func (s Sql) TinyIntType() string

TinyIntType ...

func (Sql) UnspecificType

func (s Sql) UnspecificType() string

UnspecificType ...

type SqlDialect

type SqlDialect string

Jump to

Keyboard shortcuts

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