craetetable

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Builder

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

func CreateTable

func CreateTable(name string, cb func(t *Table)) *Builder

func (*Builder) AddColumns

func (b *Builder) AddColumns(columns ...*ColumnBuilder) *Builder

func (*Builder) Columns

func (b *Builder) Columns(columns ...*ColumnBuilder) *Builder

func (*Builder) ToSQL

func (b *Builder) ToSQL(d dialects.Dialect) (string, []any, error)

type ColumnBuilder

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

func NewColumn

func NewColumn(name string) *ColumnBuilder

func (*ColumnBuilder) ToSQL

func (b *ColumnBuilder) ToSQL(d dialects.Dialect) (string, []any, error)

type Table

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

func (*Table) Float

func (t *Table) Float(name string) *ColumnBuilder

func (*Table) Int

func (t *Table) Int(name string) *ColumnBuilder

func (*Table) String

func (t *Table) String(name string) *ColumnBuilder

Jump to

Keyboard shortcuts

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