row

package
v0.0.0-...-56027fb Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Relational = NewModel("Relational")
	Analytical = NewModel("Analytical")
	WideColumn = NewModel("WideColumn")
	KeyValue   = NewModel("KeyValue")
	Log        = NewModel("Log")
	File       = NewModel("File")
)

Functions

This section is empty.

Types

type Collection

type Collection interface {
	Name() string
}

Collection represents a data collection, such as a table.

func NewCollection

func NewCollection(name string) Collection

type Column

type Column interface {
	fmt.Stringer

	Name() common.Key
	Value() common.Value
	Type() common.Type
	IsPK() bool

	WithValue(common.Value) Column
}

func NewColumn

func NewColumn[V any](n common.Key, v common.Value, t common.Type, isPK bool) Column

type Columns

type Columns interface {
	fmt.Stringer

	Len() int
	Add(Column) Columns
	Get() []Column
}

func NewColumns

func NewColumns() Columns

type Driver

type Driver interface {
	fmt.Stringer

	Model() Model
	Protocol() Protocol
	Instance() string
}

func NewDriver

func NewDriver(m Model, p Protocol, instance string) Driver

type Model

type Model interface {
	fmt.Stringer

	Name() string
}

func NewModel

func NewModel(name string) Model

type Operation

type Operation int
const (
	Default Operation = iota

	Insert
	Query
	Update
	Upsert
	Delete
)

func (Operation) String

func (o Operation) String() string

type Protocol

type Protocol interface {
	fmt.Stringer

	Name() string
}

func NewProtocol

func NewProtocol(name string) Protocol

type Row

type Row interface {
	element.Element
	fmt.Stringer

	Driver() Driver
	Collection() Collection
	Operation() Operation
	Columns() Columns

	WithKey(common.Key) Row
	WithTimestamp(time.Time) Row

	Check() error
}

func NewRow

func NewRow(d Driver, c Collection, op Operation, cols Columns) Row

Jump to

Keyboard shortcuts

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