rqlite

package
v0.15.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddIndexStatement

func AddIndexStatement(tableName string, schemaIndex *schemasv1alpha4.RqliteTableIndex) string

func BuildAlterIndexStatements

func BuildAlterIndexStatements(r *RqliteConnection, tableName string, rqliteTableSchema *schemasv1alpha4.RqliteTableSchema) ([]string, error)

func CreateTableStatements

func CreateTableStatements(tableName string, tableSchema *schemasv1alpha4.RqliteTableSchema) ([]string, error)

func DeployRqliteStatements

func DeployRqliteStatements(url string, statements []string) error

func DropColumnStatement

func DropColumnStatement(tableName string, existingColumn types.Column) (string, error)

func HostnameFromURL

func HostnameFromURL(url string) (string, error)

func InsertColumnStatement

func InsertColumnStatement(tableName string, desiredColumn *schemasv1alpha4.RqliteTableColumn) (string, error)

func PasswordFromURL

func PasswordFromURL(url string) (string, error)

func PlanRQLiteView added in v0.15.0

func PlanRQLiteView(url string, viewName string, rqliteViewSchema *schemasv1alpha4.NotImplementedViewSchema) ([]string, error)

func PlanRqliteTable

func PlanRqliteTable(url string, tableName string, rqliteTableSchema *schemasv1alpha4.RqliteTableSchema, seedData *schemasv1alpha4.SeedData) ([]string, error)

func PortFromURL

func PortFromURL(url string) (string, error)

func RecreateTableStatements

func RecreateTableStatements(tableName string, rqliteTableSchema *schemasv1alpha4.RqliteTableSchema) ([]string, error)

func RemoveIndexStatement

func RemoveIndexStatement(tableName string, index *types.Index) string

func SeedDataStatements

func SeedDataStatements(tableName string, seedData *schemasv1alpha4.SeedData) ([]string, error)

func UsernameFromURL

func UsernameFromURL(url string) (string, error)

Types

type RqliteConnection

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

func Connect

func Connect(url string) (*RqliteConnection, error)

func (RqliteConnection) Close

func (s RqliteConnection) Close() error

func (*RqliteConnection) DatabaseName

func (m *RqliteConnection) DatabaseName() string

func (*RqliteConnection) EngineVersion

func (p *RqliteConnection) EngineVersion() string

func (*RqliteConnection) GetTablePrimaryKey

func (r *RqliteConnection) GetTablePrimaryKey(tableName string) (*types.KeyConstraint, error)

func (*RqliteConnection) GetTablePrimaryKeyColumns

func (r *RqliteConnection) GetTablePrimaryKeyColumns(tableName string) ([]string, error)

func (*RqliteConnection) GetTableSchema

func (r *RqliteConnection) GetTableSchema(tableName string) ([]*types.Column, error)

func (*RqliteConnection) IndexIsAConstraint

func (r *RqliteConnection) IndexIsAConstraint(tableName string, indexName string) (bool, error)

func (*RqliteConnection) ListTableForeignKeys

func (r *RqliteConnection) ListTableForeignKeys(_ string, tableName string) ([]*types.ForeignKey, error)

func (*RqliteConnection) ListTableIndexes

func (r *RqliteConnection) ListTableIndexes(_ string, tableName string) ([]*types.Index, error)

func (*RqliteConnection) ListTables

func (r *RqliteConnection) ListTables() ([]*types.Table, error)

Jump to

Keyboard shortcuts

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