flux

package module
v0.0.0-...-f3c3327 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2021 License: MIT Imports: 8 Imported by: 2

README

bsn-flux

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CRUD

type CRUD interface {
	Compiler() node.Compiler

	Query(relationName string, root node.Node) error
	Next() (*RecordMap, error)

	Create(relationName string, values *RecordMap) (string, error)
	Update(relationName string, id string, values *RecordMap) error
	Delete(relationName string, id string) error
}

type EmptySchemaJournalist

type EmptySchemaJournalist struct {
}

func (*EmptySchemaJournalist) CreateField

func (empty *EmptySchemaJournalist) CreateField(relationName string, field *relation.Field) error

func (*EmptySchemaJournalist) CreateRelation

func (empty *EmptySchemaJournalist) CreateRelation(name string) error

func (*EmptySchemaJournalist) DeleteField

func (empty *EmptySchemaJournalist) DeleteField(relationName string, fieldname string) error

func (*EmptySchemaJournalist) DeleteRelation

func (empty *EmptySchemaJournalist) DeleteRelation(name string) error

type Record

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

func NewRecord

func NewRecord(relationName string, crud CRUD) *Record

func (*Record) Add

func (rec *Record) Add(field string, op query.OpType, rhs string) error

func (*Record) AddNumber

func (rec *Record) AddNumber(field string, op query.OpType, rhs float32) error

func (*Record) AddOr

func (rec *Record) AddOr(field string, op query.OpType, rhs string) error

func (*Record) AddOrNumber

func (rec *Record) AddOrNumber(field string, op query.OpType, rhs float32) error

func (*Record) AddPrimaryKey

func (rec *Record) AddPrimaryKey(id string) error

func (*Record) AndGroup

func (rec *Record) AndGroup() error

func (*Record) Delete

func (rec *Record) Delete() error

func (*Record) Get

func (rec *Record) Get(field string) (string, error)

func (*Record) GetMap

func (rec *Record) GetMap() *RecordMap

func (*Record) Insert

func (rec *Record) Insert() (string, error)

func (*Record) MarshalJSON

func (rec *Record) MarshalJSON() ([]byte, error)

func (*Record) Next

func (rec *Record) Next() (bool, error)

Next will return false when no records left.

func (*Record) Not

func (rec *Record) Not()

func (*Record) OrGroup

func (rec *Record) OrGroup() error

func (*Record) Query

func (rec *Record) Query() error

func (*Record) RelationName

func (rec *Record) RelationName() string

func (*Record) Set

func (rec *Record) Set(field string, value interface{})

func (*Record) Update

func (rec *Record) Update() error

type RecordMap

type RecordMap struct {
	Data map[string]interface{}
}

func NewRecordMap

func NewRecordMap() *RecordMap

func (*RecordMap) Combine

func (recmap *RecordMap) Combine(other *RecordMap) *RecordMap

func (*RecordMap) Get

func (recmap *RecordMap) Get(key string) (string, error)

func (*RecordMap) GetBool

func (recmap *RecordMap) GetBool(key string) (bool, error)

func (*RecordMap) GetNumber

func (recmap *RecordMap) GetNumber(key string) (float32, error)

func (*RecordMap) Has

func (recmap *RecordMap) Has(key string) bool

func (*RecordMap) MarshalJSON

func (recmap *RecordMap) MarshalJSON() ([]byte, error)

func (*RecordMap) Put

func (recmap *RecordMap) Put(key string, value interface{})

func (*RecordMap) Type

func (recmap *RecordMap) Type(key string) (relation.FieldType, error)

type SchemaJournalist

type SchemaJournalist interface {
	CreateRelation(name string) error
	DeleteRelation(name string) error
	CreateField(relationName string, field *relation.Field) error
	DeleteField(relationName string, fieldname string) error
}

type SchemaManager

type SchemaManager interface {
	CreateRelation(name string) error
	DeleteRelation(name string) error

	CreateField(relationName string, field *relation.Field) error
	DeleteField(relationName string, fieldname string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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