ddl

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CreateIndexStmt

type CreateIndexStmt struct {
	SourceFile  string
	SourceLine  int
	Comments    []string // -- <Comment>
	CreateIndex string   // CREATE INDEX [IF NOT EXISTS] <Index>
}

func (*CreateIndexStmt) GetSourceFile

func (stmt *CreateIndexStmt) GetSourceFile() string

func (*CreateIndexStmt) GetSourceLine

func (stmt *CreateIndexStmt) GetSourceLine() int

func (*CreateIndexStmt) SetCreateIndex

func (stmt *CreateIndexStmt) SetCreateIndex(createIndex string)

type CreateTableColumn

type CreateTableColumn struct {
	Comments       []string
	ColumnName     string
	TypeConstraint string
}

type CreateTableConstraint

type CreateTableConstraint struct {
	Comments   []string
	Constraint string
}

type CreateTableOption

type CreateTableOption struct {
	Comments []string
	Option   string
}

type CreateTableStmt

type CreateTableStmt struct {
	SourceFile  string
	SourceLine  int
	Comments    []string                 // -- <Comment>
	CreateTable string                   // CREATE TABLE [IF NOT EXISTS] <Table>
	Columns     []*CreateTableColumn     // ( <Column>, ...
	Constraints []*CreateTableConstraint // <Constraint> )
	Options     []*CreateTableOption     // <Options>;
	PrimaryKey  []string                 // PRIMARY KEY ( <Column>, ... )
}

func (*CreateTableStmt) GetSourceFile

func (stmt *CreateTableStmt) GetSourceFile() string

func (*CreateTableStmt) GetSourceLine

func (stmt *CreateTableStmt) GetSourceLine() int

func (*CreateTableStmt) SetCreateTable

func (stmt *CreateTableStmt) SetCreateTable(createTable string)

type DDL

type DDL struct {
	Indent string
	Header []string
	Stmts  []Stmt
}

func NewDDL

func NewDDL(_ context.Context) *DDL

type Stmt

type Stmt interface {
	GetSourceFile() string
	GetSourceLine() int
	// contains filtered or unexported methods
}

Directories

Path Synopsis
dialect

Jump to

Keyboard shortcuts

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