vsql

package
v0.16.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildSchema

func BuildSchema(driver Driver, queries ...Builder) string

Types

type Builder

type Builder interface {
	Build(driver Driver) string
}

type Driver

type Driver interface {
	AutoIncrement() string
	ForeignKey() string
}

func DriverFromName

func DriverFromName(name string) Driver

type QueryCreateTable

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

func CreateTable

func CreateTable(name string) *QueryCreateTable

func (*QueryCreateTable) Build

func (q *QueryCreateTable) Build(driver Driver) string

func (*QueryCreateTable) WithCreatedAt

func (q *QueryCreateTable) WithCreatedAt() *QueryCreateTable

func (*QueryCreateTable) WithDeletedAt

func (q *QueryCreateTable) WithDeletedAt() *QueryCreateTable

func (*QueryCreateTable) WithField

func (q *QueryCreateTable) WithField(name string, dataType string, options ...string) *QueryCreateTable

func (*QueryCreateTable) WithForeignKey

func (q *QueryCreateTable) WithForeignKey(field string, table string, reference string) *QueryCreateTable

func (*QueryCreateTable) WithID

func (q *QueryCreateTable) WithID() *QueryCreateTable

func (*QueryCreateTable) WithPrimaryKey

func (q *QueryCreateTable) WithPrimaryKey(fields ...string) *QueryCreateTable

func (*QueryCreateTable) WithUpdatedAt

func (q *QueryCreateTable) WithUpdatedAt() *QueryCreateTable

type QueryInsert

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

func InsertInto

func InsertInto(table string) *QueryInsert

func (*QueryInsert) Build

func (q *QueryInsert) Build(driver Driver) string

func (*QueryInsert) Columns

func (q *QueryInsert) Columns(columns ...string) *QueryInsert

func (*QueryInsert) Values

func (q *QueryInsert) Values(values ...interface{}) *QueryInsert

type QueryWithCreatedAt

type QueryWithCreatedAt struct{}

func (*QueryWithCreatedAt) Build

func (q *QueryWithCreatedAt) Build(driver Driver) string

type QueryWithDeletedAt

type QueryWithDeletedAt struct{}

func (*QueryWithDeletedAt) Build

func (q *QueryWithDeletedAt) Build(driver Driver) string

type QueryWithField

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

func (*QueryWithField) Build

func (q *QueryWithField) Build(driver Driver) string

type QueryWithForeignKey

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

func (*QueryWithForeignKey) Build

func (q *QueryWithForeignKey) Build(driver Driver) string

type QueryWithID

type QueryWithID struct{}

func (*QueryWithID) Build

func (q *QueryWithID) Build(driver Driver) string

type QueryWithPrimaryKey

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

func (*QueryWithPrimaryKey) Build

func (q *QueryWithPrimaryKey) Build(driver Driver) string

type QueryWithUpdatedAt

type QueryWithUpdatedAt struct{}

func (*QueryWithUpdatedAt) Build

func (q *QueryWithUpdatedAt) Build(driver Driver) string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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