collections

package
v0.0.0-...-3c31784 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2018 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

The collections package represents a high level approach to use unqlite trough collections which allow reading/writing/deleting/updating documents (JSONs) to and from the unqlite database.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type UnqliteCollection

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

A struct representing unqlite collection

func NewCollection

func NewCollection(name string, database *ugo.Database) *UnqliteCollection

Retrun a new collection related

func (*UnqliteCollection) Commit

func (collection *UnqliteCollection) Commit() error

func (*UnqliteCollection) DeleteRecordByID

func (collection *UnqliteCollection) DeleteRecordByID(record_id int64) (error, bool)

func (*UnqliteCollection) DropCollection

func (collection *UnqliteCollection) DropCollection() (error, bool)

func (*UnqliteCollection) FetchRecords

func (collection *UnqliteCollection) FetchRecords(path string) (error, string)

func (*UnqliteCollection) Flush

func (collection *UnqliteCollection) Flush()

func (*UnqliteCollection) GetAll

func (collection *UnqliteCollection) GetAll() (error, string)

func (*UnqliteCollection) GetAutoCommit

func (collection *UnqliteCollection) GetAutoCommit() bool

func (*UnqliteCollection) GetAutoCreate

func (collection *UnqliteCollection) GetAutoCreate() bool

func (*UnqliteCollection) GetLastExecutionOutput

func (collection *UnqliteCollection) GetLastExecutionOutput() string

func (*UnqliteCollection) GetName

func (collection *UnqliteCollection) GetName() string

func (*UnqliteCollection) GetRecordByID

func (collection *UnqliteCollection) GetRecordByID(record_id int64) (error, string)

func (*UnqliteCollection) GetScript

func (collection *UnqliteCollection) GetScript() *jx9.JX9_script

func (*UnqliteCollection) GetTotalNumberOfRecord

func (collection *UnqliteCollection) GetTotalNumberOfRecord() (error, int64)

func (*UnqliteCollection) IsCommited

func (collection *UnqliteCollection) IsCommited() bool

func (*UnqliteCollection) SaveRecords

func (collection *UnqliteCollection) SaveRecords(json_code string) (error, bool)

func (*UnqliteCollection) SetAutoCommit

func (collection *UnqliteCollection) SetAutoCommit(auto_commit bool)

func (*UnqliteCollection) SetAutoCreate

func (collection *UnqliteCollection) SetAutoCreate(auto_create bool)

func (*UnqliteCollection) UpdateRecord

func (collection *UnqliteCollection) UpdateRecord(record_id int64, json_code string) (error, int64)

type UnqliteCollectionError

type UnqliteCollectionError string

A string representing a error related to collections

func (UnqliteCollectionError) Error

func (err UnqliteCollectionError) Error() string

A wrapped to allow use the UnqliteCollectionError with error interface

Jump to

Keyboard shortcuts

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