Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Collection ¶
type Collection struct { Name string `json:"name"` System bool `json:"isSystem"` Status int `json:"status"` // 3 = Edges , 2 = Documents Type int `json:"type"` // contains filtered or unexported fields }
func (*Collection) Replace ¶
func (col *Collection) Replace(key string, doc interface{}) (DocumentMeta, error)
Replace document
func (*Collection) Save ¶
func (col *Collection) Save(doc interface{}) (DocumentMeta, error)
Save saves doc into collection, doc should have Document Embedded to retrieve error and Key later.
type CollectionOptions ¶
type CollectionOptions struct { Name string `json:"name"` Type uint `json:"type"` Sync bool `json:"waitForSync,omitempty"` Compact bool `json:"doCompact,omitempty"` JournalSize int `json:"journalSize,omitempty"` System bool `json:"isSystem,omitempty"` Volatile bool `json:"isVolatile,omitempty"` Keys map[string]interface{} `json:"keyOptions,omitempty"` // Count Count int64 `json:"count"` // Cluster Shards int `json:"numberOfShards,omitempty"` ShardKeys []string `json:"shardKeys,omitempty"` }
type Cursor ¶
type Cursor struct { Id string `json:"Id"` Index int `json:"-"` Result []interface{} `json:"result"` More bool `json:"hasMore"` Amount int `json:"count"` Err bool `json:"error"` ErrMsg string `json:"errorMessage"` Code int `json:"code"` Time time.Duration `json:"time"` // contains filtered or unexported fields }
type Database ¶
type Database struct { Name string `json:"name"` Id string `json:"id"` Path string `json:"path"` System bool `json:"isSystem"` Collections []Collection // contains filtered or unexported fields }
Database struct
func (Database) Col ¶
func (db Database) Col(name string) *Collection
Col returns Collection attached to current Database
func (*Database) CreateCollection ¶
func (d *Database) CreateCollection(c *CollectionOptions) error
Create collections
type DocumentMeta ¶
type DocumentMeta struct {
driver.DocumentMeta
}
type Query ¶
type Query struct { // mandatory Aql string `json:"query,omitempty"` //Optional values Batch int `json:"batchSize,omitempty"` Count bool `json:"count,omitempty"` BindVars map[string]interface{} `json:"bindVars,omitempty"` Options map[string]interface{} `json:"options,omitempty"` // opetions fullCount bool // Note that the fullCount sub-attribute will only be present in the result if the query has a LIMIT clause and the LIMIT clause is actually used in the query. // Control Validate bool `json:"-"` ErrorMsg string `json:"errorMessage,omitempty"` }
Aql query
Source Files ¶
Click to show internal directories.
Click to hide internal directories.