core

package
v0.0.83 Latest Latest
Warning

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

Go to latest
Published: Dec 28, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const ModeBridge = 3 /** Bridge */
View Source
const ModeIdle = 1 /** Libre */
View Source
const ModeNode = 2 /** Node */
View Source
const ModeNone = 0 /** Node */

* * Mode * Handler for CRUD data

Variables

View Source
var (
	ModeId    string
	ModeTp    int
	MasterIdx int
)
View Source
var Configs *linq.Model
View Source
var SchemaCore *linq.Schema

Functions

func ChangePassword added in v0.0.29

func ChangePassword(db int, name, password string) (bool, error)

func CreateColumn added in v0.0.29

func CreateColumn(db int, schema, table, name, kind, defaultValue string) (bool, error)

func CreateDatabase added in v0.0.29

func CreateDatabase(db int, name string) (bool, error)

* * *

func CreateIndex

func CreateIndex(db int, schema, table, field string) (bool, error)

func CreateSchema added in v0.0.29

func CreateSchema(db int, name string) (bool, error)

func CreateSerie added in v0.0.56

func CreateSerie(db int, schema, tag string) (bool, error)

func CreateUser added in v0.0.29

func CreateUser(db int, name, password string) (bool, error)

func DefineConfig added in v0.0.34

func DefineConfig() error

func DefineMode added in v0.0.34

func DefineMode() error

func DefineRecycling added in v0.0.34

func DefineRecycling() error

func DefineReference added in v0.0.34

func DefineReference() error

func DefineSchemaCore added in v0.0.76

func DefineSchemaCore() error

func DefineSeries added in v0.0.34

func DefineSeries() error

func DefineSync added in v0.0.34

func DefineSync() error

func DeleteConfig added in v0.0.34

func DeleteConfig(key string) (e.Item, error)

func EnabledSeries added in v0.0.57

func EnabledSeries() bool

* * *

func ExistColum added in v0.0.29

func ExistColum(db int, schema, table, name string) (bool, error)

func ExistDatabase added in v0.0.29

func ExistDatabase(db int, name string) (bool, error)

* *

func ExistIndex added in v0.0.29

func ExistIndex(db int, schema, table, field string) (bool, error)

func ExistSchema added in v0.0.29

func ExistSchema(db int, name string) (bool, error)

func ExistSerie added in v0.0.56

func ExistSerie(db int, schema, name string) (bool, error)

func ExistTable added in v0.0.29

func ExistTable(db int, schema, name string) (bool, error)

func ExistUser added in v0.0.29

func ExistUser(db int, name string) (bool, error)

func GetCode

func GetCode(tag, prefix string) string

func GetConfig added in v0.0.34

func GetConfig(key string, _default string) (string, error)

func GetMarterNodeById

func GetMarterNodeById(db int, id string) (e.Item, error)

func GetMode

func GetMode() (e.Item, error)

func GetSerie

func GetSerie(tag string) int

* * *

func GetSerieLast

func GetSerieLast(tag string) int

func InitDefine added in v0.0.75

func InitDefine() error

func InitModel

func InitModel(model *linq.Model) error

func JoinToMaster

func JoinToMaster() error

func NextVal added in v0.0.56

func NextVal(tag string) int

func SetMode added in v0.0.34

func SetMode(mode int, driver, host string, port int, dbname, user, password string) (e.Item, error)

func SetRecycligTrigger added in v0.0.29

func SetRecycligTrigger(schema, table string) error

func SetReferences added in v0.0.29

func SetReferences(references []*linq.ReferenceValue)

* * After reference *

func SetSerieValue

func SetSerieValue(db int, tag string, val int) (int, error)

func SetSyncTrigger added in v0.0.29

func SetSyncTrigger(schema, table string) error

func SyncSeries

func SyncSeries(masterIdx int, c chan int) error

func UpSetMasterNode

func UpSetMasterNode(db int, id string, mode int, driver, host string, port int, dbname, user, password string) (e.Item, error)

func UpsertConfig added in v0.0.34

func UpsertConfig(key, value string) (e.Item, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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