Documentation
¶
Index ¶
- Constants
- Variables
- func BinaryToUint64(slB []byte) uint64
- func ChangeColumn(sNameDB, sNameTable string, stNewDataColumn gtypes.TColumnForWrite, ...) bool
- func CheckFolder(sPath, sName string) bool
- func CreateColumn(sNameDB, sNameTable, sNameColumn string, isSecure bool, ...) bool
- func CreateDB(sNameDB string, sOwner string, isSecure bool) bool
- func CreateTable(sNameDB, sNameTable string, isSecure bool) bool
- func Decode64(sInput string) string
- func DeleteRows(sNameDB, sNameTable string, stDeleteIn gtypes.TDeleteStruct) ([]uint64, bool)
- func Encode64(sInput string) string
- func GenerateName() string
- func GenerateRev() string
- func GetColumnById(sNameColumn string, uIdRow uint64, stAddData gtypes.TAdditionalData) (string, bool)
- func GetDBAccess(sNameDB string) (gtypes.TAccess, bool)
- func GetInfoById(uIdRow uint64, stAddData gtypes.TAdditionalData) (sTime string, sStatus string, sShape string, isOk bool)
- func IfExistTable(sDB, sTable string) bool
- func InsertIntoBuffer(stRowsForStore []gtypes.TRowForStore)
- func InsertRows(sNameDB, sNameTable string, slSColumns []string, slSlSRowsIn [][]string) ([]uint64, bool)
- func LoadLocalCoreSettings(cfg *config.TConfig) tCoreSettings
- func OrderByVQL(uIds []uint64, stOrderByExp gtypes.TOrderBy, ...) []uint64
- func Pow(uBase uint64, uExponent uint8) uint64
- func RemoveColumn(sNameDB, sNameTable, sNameColumn string) bool
- func RemoveDB(sNameDB string) bool
- func RemoveTable(sNameDB, sNameTable string) bool
- func RenameDB(sOldName, sNewName string, isSecure bool) bool
- func RenameTable(sNameDB, sOldNameTable, sNewNameTable string, isSecure bool) bool
- func SelectRows(sNameDB, sNameTable string, stSelectIn gtypes.TSelectStruct) ([]gtypes.TResponseRow, bool)
- func SetAccessFlags(sDB, sUser string, stFlags gtypes.TAccessFlags)
- func Shutdown(ctx context.Context, c *closer.TCloser)
- func Start(cfg *config.TConfig)
- func StrongRemoveColumn(sNameDB, sNameTable, sNameColumn string) bool
- func StrongRemoveDB(sNameDB string) bool
- func StrongRemoveTable(sNameDB, sNameTable string) bool
- func TruncateTable(sNameDB, sNameTable string) bool
- func Uint64ToBinary(u uint64) []byte
- func UpdateRows(sNameDB, sNameTable string, stUpdateIn gtypes.TUpdaateStruct) ([]uint64, bool)
- func WhereSelection(slStWhere []gtypes.TConditions, stAdditionalData gtypes.TAdditionalData) []uint64
- func WriteBufferService()
- type TColumnInfo
- type TDBInfo
- type TState
- type TTableInfo
Constants ¶
View Source
const ( INFOFILE_DB = "db.json" INFOFILE_STORAGE = "storage.json" POSTFIX_ID = "_id" )
Variables ¶
View Source
var MStates map[string]TState // ticket -> tState
View Source
var StLocalCoreSettings tCoreSettings = tCoreSettings{ Storage: "./data", BucketSize: 800, FriendlyMode: true, }
View Source
var StStorageInfo tStorageInfo = tStorageInfo{}
View Source
var StWriteBuffer = gtypes.TCollectBuffers{
Switch: 1,
}
Functions ¶
func BinaryToUint64 ¶
func ChangeColumn ¶
func ChangeColumn(sNameDB, sNameTable string, stNewDataColumn gtypes.TColumnForWrite, isSecure bool) bool
Changing a column
func CreateColumn ¶
func CreateColumn(sNameDB, sNameTable, sNameColumn string, isSecure bool, stSpecification gtypes.TColumnSpecification) bool
Creating a new column
func CreateTable ¶
Creating a new table.
func DeleteRows ¶
func DeleteRows(sNameDB, sNameTable string, stDeleteIn gtypes.TDeleteStruct) ([]uint64, bool)
func GetColumnById ¶
func GetColumnById(sNameColumn string, uIdRow uint64, stAddData gtypes.TAdditionalData) (string, bool)
Get up-to-date cell data
func GetInfoById ¶
func IfExistTable ¶
func InsertIntoBuffer ¶
func InsertIntoBuffer(stRowsForStore []gtypes.TRowForStore)
func InsertRows ¶
func LoadLocalCoreSettings ¶
func OrderByVQL ¶
func RemoveColumn ¶
Marks the column as deleted, but does not delete files.
func RemoveTable ¶
Marks the table as deleted, but does not delete files.
func RenameTable ¶
Rename a table.
func SelectRows ¶
func SelectRows(sNameDB, sNameTable string, stSelectIn gtypes.TSelectStruct) ([]gtypes.TResponseRow, bool)
func SetAccessFlags ¶
func SetAccessFlags(sDB, sUser string, stFlags gtypes.TAccessFlags)
func StrongRemoveColumn ¶
Deletes the folder and column files, if column was mark as 'removed'
func StrongRemoveDB ¶
Deletes the folder and database files, if DB was mark as 'removed'
func StrongRemoveTable ¶
Deletes the folder and table files, if table was mark as 'removed'
func TruncateTable ¶
func Uint64ToBinary ¶
func UpdateRows ¶
func UpdateRows(sNameDB, sNameTable string, stUpdateIn gtypes.TUpdaateStruct) ([]uint64, bool)
func WhereSelection ¶
func WhereSelection(slStWhere []gtypes.TConditions, stAdditionalData gtypes.TAdditionalData) []uint64
func WriteBufferService ¶
func WriteBufferService()
Types ¶
type TColumnInfo ¶
type TColumnInfo struct {
Name string `json:"name"`
OldName string `json:"oldname"` // only for core
Folder string `json:"folder"`
Parents string `json:"parents"`
Specification gtypes.TColumnSpecification `json:"specification"`
LastUpdate time.Time `json:"lastupdate"`
Deleted bool `json:"deleted"`
}
type TDBInfo ¶
type TDBInfo struct {
Name string `json:"name"`
Folder string `json:"folder"`
Tables map[string]TTableInfo `json:"tables"`
Removed []TTableInfo `json:"removed"` // Removed tables
LastUpdate time.Time `json:"lastupdate"`
Deleted bool `json:"deleted"`
}
type TTableInfo ¶
type TTableInfo struct {
Name string `json:"name"`
Patronymic string `json:"patronymic"`
Folder string `json:"folder"`
Parent string `json:"parent"`
Columns map[string]TColumnInfo `json:"columns"`
Removed []TColumnInfo `json:"removed"` // Removed columns
Order []string `json:"order"`
BucketLog uint8 `json:"blog"`
BucketSize int64 `json:"bsize"`
OldRev string `json:"oldrev"`
CurrentRev string `json:"currentrev"`
Count uint64 `json:"count"`
LastUpdate time.Time `json:"lastupdate"`
Deleted bool `json:"deleted"`
}
Click to show internal directories.
Click to hide internal directories.