Documentation ¶
Index ¶
- Constants
- Variables
- func DefaultQueryImplementation(indexer Indexer, collection *dal.Collection, f *filter.Filter, ...) (*dal.RecordSet, error)
- func InflateEmbeddedRecords(backend Backend, parent *dal.Collection, record *dal.Record, ...) error
- func PopulateRecordSetPageDetails(recordset *dal.RecordSet, f *filter.Filter, page IndexPage)
- func RegisterBackend(name string, fn BackendFunc)
- type Aggregator
- type Backend
- func MakeBackend(connection dal.ConnectionString) (Backend, error)
- func NewDynamoBackend(connection dal.ConnectionString) Backend
- func NewFilesystemBackend(connection dal.ConnectionString) Backend
- func NewMongoBackend(connection dal.ConnectionString) Backend
- func NewRedisBackend(connection dal.ConnectionString) Backend
- func NewSqlBackend(connection dal.ConnectionString) Backend
- type BackendFunc
- type BleveIndexer
- func (self *BleveIndexer) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
- func (self *BleveIndexer) FlushIndex() error
- func (self *BleveIndexer) GetBackend() Backend
- func (self *BleveIndexer) Index(collection *dal.Collection, records *dal.RecordSet) error
- func (self *BleveIndexer) IndexConnectionString() *dal.ConnectionString
- func (self *BleveIndexer) IndexExists(collection *dal.Collection, id interface{}) bool
- func (self *BleveIndexer) IndexInitialize(parent Backend) error
- func (self *BleveIndexer) IndexRemove(collection *dal.Collection, ids []interface{}) error
- func (self *BleveIndexer) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
- func (self *BleveIndexer) ListValues(collection *dal.Collection, fields []string, f *filter.Filter) (map[string][]interface{}, error)
- func (self *BleveIndexer) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
- func (self *BleveIndexer) QueryFunc(collection *dal.Collection, f *filter.Filter, resultFn IndexResultFunc) error
- type CachingBackend
- func (self *CachingBackend) CreateCollection(definition *dal.Collection) error
- func (self *CachingBackend) Delete(collection string, ids ...interface{}) error
- func (self *CachingBackend) DeleteCollection(collection string) error
- func (self *CachingBackend) Exists(collection string, id interface{}) bool
- func (self *CachingBackend) Flush() error
- func (self *CachingBackend) GetCollection(collection string) (*dal.Collection, error)
- func (self *CachingBackend) GetConnectionString() *dal.ConnectionString
- func (self *CachingBackend) Initialize() error
- func (self *CachingBackend) Insert(collection string, records *dal.RecordSet) error
- func (self *CachingBackend) ListCollections() ([]string, error)
- func (self *CachingBackend) Ping(d time.Duration) error
- func (self *CachingBackend) RegisterCollection(c *dal.Collection)
- func (self *CachingBackend) ResetCache()
- func (self *CachingBackend) Retrieve(collection string, id interface{}, fields ...string) (*dal.Record, error)
- func (self *CachingBackend) SetIndexer(cs dal.ConnectionString) error
- func (self *CachingBackend) String() string
- func (self *CachingBackend) Update(collection string, records *dal.RecordSet, target ...string) error
- func (self *CachingBackend) WithAggregator(collection *dal.Collection) Aggregator
- func (self *CachingBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
- type ConnectOptions
- type DynamoBackend
- func (self *DynamoBackend) CreateCollection(definition *dal.Collection) error
- func (self *DynamoBackend) Delete(name string, ids ...interface{}) error
- func (self *DynamoBackend) DeleteCollection(name string) error
- func (self *DynamoBackend) DeleteQuery(collection *dal.Collection, flt *filter.Filter) error
- func (self *DynamoBackend) Exists(name string, id interface{}) bool
- func (self *DynamoBackend) Flush() error
- func (self *DynamoBackend) FlushIndex() error
- func (self *DynamoBackend) GetBackend() Backend
- func (self *DynamoBackend) GetCollection(name string) (*dal.Collection, error)
- func (self *DynamoBackend) GetConnectionString() *dal.ConnectionString
- func (self *DynamoBackend) Index(collection *dal.Collection, records *dal.RecordSet) error
- func (self *DynamoBackend) IndexConnectionString() *dal.ConnectionString
- func (self *DynamoBackend) IndexExists(collection *dal.Collection, id interface{}) bool
- func (self *DynamoBackend) IndexInitialize(Backend) error
- func (self *DynamoBackend) IndexRemove(collection *dal.Collection, ids []interface{}) error
- func (self *DynamoBackend) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
- func (self *DynamoBackend) Initialize() error
- func (self *DynamoBackend) Insert(name string, records *dal.RecordSet) error
- func (self *DynamoBackend) ListCollections() ([]string, error)
- func (self *DynamoBackend) ListValues(collection *dal.Collection, fields []string, flt *filter.Filter) (map[string][]interface{}, error)
- func (self *DynamoBackend) Ping(timeout time.Duration) error
- func (self *DynamoBackend) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
- func (self *DynamoBackend) QueryFunc(collection *dal.Collection, flt *filter.Filter, resultFn IndexResultFunc) error
- func (self *DynamoBackend) RegisterCollection(definition *dal.Collection)
- func (self *DynamoBackend) Retrieve(name string, id interface{}, fields ...string) (*dal.Record, error)
- func (self *DynamoBackend) SetIndexer(indexConnString dal.ConnectionString) error
- func (self *DynamoBackend) String() string
- func (self *DynamoBackend) Update(name string, records *dal.RecordSet, target ...string) error
- func (self *DynamoBackend) WithAggregator(collection *dal.Collection) Aggregator
- func (self *DynamoBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
- type ElasticsearchIndexer
- func (self *ElasticsearchIndexer) AggregatorConnectionString() *dal.ConnectionString
- func (self *ElasticsearchIndexer) AggregatorInitialize(parent Backend) error
- func (self *ElasticsearchIndexer) Average(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- func (self *ElasticsearchIndexer) Count(collection *dal.Collection, flt ...*filter.Filter) (uint64, error)
- func (self *ElasticsearchIndexer) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
- func (self *ElasticsearchIndexer) FlushIndex() error
- func (self *ElasticsearchIndexer) GetBackend() Backend
- func (self *ElasticsearchIndexer) GroupBy(collection *dal.Collection, groupBy []string, aggregates []filter.Aggregate, ...) (*dal.RecordSet, error)
- func (self *ElasticsearchIndexer) Index(collection *dal.Collection, records *dal.RecordSet) error
- func (self *ElasticsearchIndexer) IndexConnectionString() *dal.ConnectionString
- func (self *ElasticsearchIndexer) IndexExists(collection *dal.Collection, id interface{}) bool
- func (self *ElasticsearchIndexer) IndexInitialize(parent Backend) error
- func (self *ElasticsearchIndexer) IndexRemove(collection *dal.Collection, ids []interface{}) error
- func (self *ElasticsearchIndexer) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
- func (self *ElasticsearchIndexer) ListValues(collection *dal.Collection, fields []string, f *filter.Filter) (map[string][]interface{}, error)
- func (self *ElasticsearchIndexer) Maximum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- func (self *ElasticsearchIndexer) Minimum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- func (self *ElasticsearchIndexer) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
- func (self *ElasticsearchIndexer) QueryFunc(collection *dal.Collection, f *filter.Filter, resultFn IndexResultFunc) error
- func (self *ElasticsearchIndexer) Sum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- type EmbeddedRecordBackend
- func (self *EmbeddedRecordBackend) CreateCollection(definition *dal.Collection) error
- func (self *EmbeddedRecordBackend) Delete(collection string, ids ...interface{}) error
- func (self *EmbeddedRecordBackend) DeleteCollection(collection string) error
- func (self *EmbeddedRecordBackend) Exists(collection string, id interface{}) bool
- func (self *EmbeddedRecordBackend) Flush() error
- func (self *EmbeddedRecordBackend) GetCollection(collection string) (*dal.Collection, error)
- func (self *EmbeddedRecordBackend) GetConnectionString() *dal.ConnectionString
- func (self *EmbeddedRecordBackend) Inflate(collection *dal.Collection, record *dal.Record) (*dal.Record, error)
- func (self *EmbeddedRecordBackend) Initialize() error
- func (self *EmbeddedRecordBackend) Insert(collection string, records *dal.RecordSet) error
- func (self *EmbeddedRecordBackend) ListCollections() ([]string, error)
- func (self *EmbeddedRecordBackend) Ping(d time.Duration) error
- func (self *EmbeddedRecordBackend) RegisterCollection(c *dal.Collection)
- func (self *EmbeddedRecordBackend) Retrieve(name string, id interface{}, fields ...string) (*dal.Record, error)
- func (self *EmbeddedRecordBackend) SetIndexer(cs dal.ConnectionString) error
- func (self *EmbeddedRecordBackend) String() string
- func (self *EmbeddedRecordBackend) Update(collection string, records *dal.RecordSet, target ...string) error
- func (self *EmbeddedRecordBackend) WithAggregator(collection *dal.Collection) Aggregator
- func (self *EmbeddedRecordBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
- type FilesystemBackend
- func (self *FilesystemBackend) CreateCollection(definition *dal.Collection) error
- func (self *FilesystemBackend) Delete(name string, ids ...interface{}) error
- func (self *FilesystemBackend) DeleteCollection(name string) error
- func (self *FilesystemBackend) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
- func (self *FilesystemBackend) Exists(name string, id interface{}) bool
- func (self *FilesystemBackend) Flush() error
- func (self *FilesystemBackend) FlushIndex() error
- func (self *FilesystemBackend) GetBackend() Backend
- func (self *FilesystemBackend) GetCollection(name string) (*dal.Collection, error)
- func (self *FilesystemBackend) GetConnectionString() *dal.ConnectionString
- func (self *FilesystemBackend) Index(collection *dal.Collection, records *dal.RecordSet) error
- func (self *FilesystemBackend) IndexConnectionString() *dal.ConnectionString
- func (self *FilesystemBackend) IndexExists(collection *dal.Collection, id interface{}) bool
- func (self *FilesystemBackend) IndexInitialize(_ Backend) error
- func (self *FilesystemBackend) IndexRemove(collection *dal.Collection, ids []interface{}) error
- func (self *FilesystemBackend) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
- func (self *FilesystemBackend) Initialize() error
- func (self *FilesystemBackend) Insert(collectionName string, recordset *dal.RecordSet) error
- func (self *FilesystemBackend) ListCollections() ([]string, error)
- func (self *FilesystemBackend) ListValues(collection *dal.Collection, fields []string, f *filter.Filter) (map[string][]interface{}, error)
- func (self *FilesystemBackend) Ping(timeout time.Duration) error
- func (self *FilesystemBackend) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
- func (self *FilesystemBackend) QueryFunc(collection *dal.Collection, filter *filter.Filter, resultFn IndexResultFunc) error
- func (self *FilesystemBackend) RegisterCollection(collection *dal.Collection)
- func (self *FilesystemBackend) Retrieve(name string, id interface{}, fields ...string) (*dal.Record, error)
- func (self *FilesystemBackend) SetIndexer(indexConnString dal.ConnectionString) error
- func (self *FilesystemBackend) String() string
- func (self *FilesystemBackend) Update(name string, recordset *dal.RecordSet, target ...string) error
- func (self *FilesystemBackend) WithAggregator(collection *dal.Collection) Aggregator
- func (self *FilesystemBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
- type IndexOperation
- type IndexPage
- type IndexResultFunc
- type IndexSelectionStrategy
- type Indexer
- type IndexerResult
- type IndexerResultFunc
- type MetaIndex
- func (self *MetaIndex) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
- func (self *MetaIndex) FlushIndex() error
- func (self *MetaIndex) GetBackend() Backend
- func (self *MetaIndex) Index(collection *dal.Collection, records *dal.RecordSet) error
- func (self *MetaIndex) IndexConnectionString() *dal.ConnectionString
- func (self *MetaIndex) IndexExists(collection *dal.Collection, id interface{}) bool
- func (self *MetaIndex) IndexInitialize(_ Backend) error
- func (self *MetaIndex) IndexRemove(collection *dal.Collection, ids []interface{}) error
- func (self *MetaIndex) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
- func (self *MetaIndex) ListValues(collection *dal.Collection, fields []string, filter *filter.Filter) (map[string][]interface{}, error)
- func (self *MetaIndex) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
- func (self *MetaIndex) QueryFunc(collection *dal.Collection, f *filter.Filter, resultFn IndexResultFunc) error
- type Migratable
- type MongoBackend
- func (self *MongoBackend) AggregatorConnectionString() *dal.ConnectionString
- func (self *MongoBackend) AggregatorInitialize(parent Backend) error
- func (self *MongoBackend) Average(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- func (self *MongoBackend) Count(collection *dal.Collection, flt ...*filter.Filter) (uint64, error)
- func (self *MongoBackend) CreateCollection(definition *dal.Collection) error
- func (self *MongoBackend) Delete(name string, ids ...interface{}) error
- func (self *MongoBackend) DeleteCollection(name string) error
- func (self *MongoBackend) DeleteQuery(collection *dal.Collection, flt *filter.Filter) error
- func (self *MongoBackend) Exists(name string, id interface{}) bool
- func (self *MongoBackend) Flush() error
- func (self *MongoBackend) FlushIndex() error
- func (self *MongoBackend) GetBackend() Backend
- func (self *MongoBackend) GetCollection(name string) (*dal.Collection, error)
- func (self *MongoBackend) GetConnectionString() *dal.ConnectionString
- func (self *MongoBackend) GroupBy(collection *dal.Collection, groupBy []string, aggregates []filter.Aggregate, ...) (*dal.RecordSet, error)
- func (self *MongoBackend) Index(collection *dal.Collection, records *dal.RecordSet) error
- func (self *MongoBackend) IndexConnectionString() *dal.ConnectionString
- func (self *MongoBackend) IndexExists(collection *dal.Collection, id interface{}) bool
- func (self *MongoBackend) IndexInitialize(Backend) error
- func (self *MongoBackend) IndexRemove(collection *dal.Collection, ids []interface{}) error
- func (self *MongoBackend) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
- func (self *MongoBackend) Initialize() error
- func (self *MongoBackend) Insert(name string, records *dal.RecordSet) error
- func (self *MongoBackend) ListCollections() ([]string, error)
- func (self *MongoBackend) ListValues(collection *dal.Collection, fields []string, flt *filter.Filter) (map[string][]interface{}, error)
- func (self *MongoBackend) Maximum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- func (self *MongoBackend) Minimum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- func (self *MongoBackend) Ping(timeout time.Duration) error
- func (self *MongoBackend) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
- func (self *MongoBackend) QueryFunc(collection *dal.Collection, flt *filter.Filter, resultFn IndexResultFunc) error
- func (self *MongoBackend) RegisterCollection(collection *dal.Collection)
- func (self *MongoBackend) Retrieve(name string, id interface{}, fields ...string) (*dal.Record, error)
- func (self *MongoBackend) SetIndexer(indexConnString dal.ConnectionString) error
- func (self *MongoBackend) String() string
- func (self *MongoBackend) Sum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- func (self *MongoBackend) Update(name string, records *dal.RecordSet, target ...string) error
- func (self *MongoBackend) WithAggregator(collection *dal.Collection) Aggregator
- func (self *MongoBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
- type MultiIndex
- func (self *MultiIndex) AddIndexer(indexer Indexer) error
- func (self *MultiIndex) AddIndexerByConnectionString(cs string) error
- func (self *MultiIndex) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
- func (self *MultiIndex) EachSelectedIndex(collection *dal.Collection, operation IndexOperation, ...) error
- func (self *MultiIndex) FlushIndex() error
- func (self *MultiIndex) GetBackend() Backend
- func (self *MultiIndex) Index(collection *dal.Collection, records *dal.RecordSet) error
- func (self *MultiIndex) IndexConnectionString() *dal.ConnectionString
- func (self *MultiIndex) IndexExists(collection *dal.Collection, id interface{}) bool
- func (self *MultiIndex) IndexInitialize(backend Backend) error
- func (self *MultiIndex) IndexRemove(collection *dal.Collection, ids []interface{}) error
- func (self *MultiIndex) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
- func (self *MultiIndex) ListValues(collection *dal.Collection, fields []string, filter *filter.Filter) (map[string][]interface{}, error)
- func (self *MultiIndex) Query(collection *dal.Collection, filter *filter.Filter, ...) (*dal.RecordSet, error)
- func (self *MultiIndex) QueryFunc(collection *dal.Collection, filter *filter.Filter, resultFn IndexResultFunc) error
- func (self *MultiIndex) SelectIndex(collection *dal.Collection, operation IndexOperation, lastIndexer int) ([]IndexerResult, error)
- type NullIndexer
- func (self *NullIndexer) DeleteQuery(collection *dal.Collection, f filter.Filter) error
- func (self *NullIndexer) FlushIndex() error
- func (self *NullIndexer) GetBackend() Backend
- func (self *NullIndexer) Index(collection *dal.Collection, records *dal.RecordSet) error
- func (self *NullIndexer) IndexConnectionString() *dal.ConnectionString
- func (self *NullIndexer) IndexExists(collection *dal.Collection, id interface{}) bool
- func (self *NullIndexer) IndexInitialize(Backend) error
- func (self *NullIndexer) IndexRemove(collection *dal.Collection, ids []interface{}) error
- func (self *NullIndexer) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
- func (self *NullIndexer) ListValues(collection *dal.Collection, fields []string, filter filter.Filter) (map[string][]interface{}, error)
- func (self *NullIndexer) Query(collection *dal.Collection, filter filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
- func (self *NullIndexer) QueryFunc(collection *dal.Collection, filter filter.Filter, resultFn IndexResultFunc) error
- type RedisBackend
- func (self *RedisBackend) CreateCollection(definition *dal.Collection) error
- func (self *RedisBackend) Delete(name string, ids ...interface{}) error
- func (self *RedisBackend) DeleteCollection(name string) error
- func (self *RedisBackend) DeleteQuery(collection *dal.Collection, flt *filter.Filter) error
- func (self *RedisBackend) Exists(name string, id interface{}) bool
- func (self *RedisBackend) Flush() error
- func (self *RedisBackend) FlushIndex() error
- func (self *RedisBackend) GetBackend() Backend
- func (self *RedisBackend) GetCollection(name string) (*dal.Collection, error)
- func (self *RedisBackend) GetConnectionString() *dal.ConnectionString
- func (self *RedisBackend) Index(collection *dal.Collection, records *dal.RecordSet) error
- func (self *RedisBackend) IndexConnectionString() *dal.ConnectionString
- func (self *RedisBackend) IndexExists(collection *dal.Collection, id interface{}) bool
- func (self *RedisBackend) IndexInitialize(Backend) error
- func (self *RedisBackend) IndexRemove(collection *dal.Collection, ids []interface{}) error
- func (self *RedisBackend) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
- func (self *RedisBackend) Initialize() error
- func (self *RedisBackend) Insert(name string, recordset *dal.RecordSet) error
- func (self *RedisBackend) ListCollections() ([]string, error)
- func (self *RedisBackend) ListValues(collection *dal.Collection, fields []string, flt *filter.Filter) (map[string][]interface{}, error)
- func (self *RedisBackend) Ping(timeout time.Duration) error
- func (self *RedisBackend) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
- func (self *RedisBackend) QueryFunc(collection *dal.Collection, flt *filter.Filter, resultFn IndexResultFunc) error
- func (self *RedisBackend) RegisterCollection(collection *dal.Collection)
- func (self *RedisBackend) Retrieve(name string, id interface{}, fields ...string) (*dal.Record, error)
- func (self *RedisBackend) SetIndexer(indexConnString dal.ConnectionString) error
- func (self *RedisBackend) String() string
- func (self *RedisBackend) Update(name string, recordset *dal.RecordSet, target ...string) error
- func (self *RedisBackend) WithAggregator(collection *dal.Collection) Aggregator
- func (self *RedisBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
- type SerializationFormat
- type SqlBackend
- func (self *SqlBackend) AggregatorConnectionString() *dal.ConnectionString
- func (self *SqlBackend) AggregatorInitialize(parent Backend) error
- func (self *SqlBackend) Average(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- func (self *SqlBackend) Count(collection *dal.Collection, f ...*filter.Filter) (uint64, error)
- func (self *SqlBackend) CreateCollection(definition *dal.Collection) error
- func (self *SqlBackend) Delete(name string, ids ...interface{}) error
- func (self *SqlBackend) DeleteCollection(collectionName string) error
- func (self *SqlBackend) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
- func (self *SqlBackend) Exists(name string, id interface{}) bool
- func (self *SqlBackend) Flush() error
- func (self *SqlBackend) FlushIndex() error
- func (self *SqlBackend) GetBackend() Backend
- func (self *SqlBackend) GetCollection(name string) (*dal.Collection, error)
- func (self *SqlBackend) GetConnectionString() *dal.ConnectionString
- func (self *SqlBackend) GroupBy(collection *dal.Collection, groupBy []string, aggregates []filter.Aggregate, ...) (*dal.RecordSet, error)
- func (self *SqlBackend) Index(collection *dal.Collection, records *dal.RecordSet) error
- func (self *SqlBackend) IndexConnectionString() *dal.ConnectionString
- func (self *SqlBackend) IndexExists(collection *dal.Collection, id interface{}) bool
- func (self *SqlBackend) IndexInitialize(parent Backend) error
- func (self *SqlBackend) IndexRemove(collection *dal.Collection, ids []interface{}) error
- func (self *SqlBackend) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
- func (self *SqlBackend) Initialize() error
- func (self *SqlBackend) Insert(name string, recordset *dal.RecordSet) error
- func (self *SqlBackend) ListCollections() ([]string, error)
- func (self *SqlBackend) ListValues(collection *dal.Collection, fields []string, f *filter.Filter) (map[string][]interface{}, error)
- func (self *SqlBackend) Maximum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- func (self *SqlBackend) Minimum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- func (self *SqlBackend) Ping(timeout time.Duration) error
- func (self *SqlBackend) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
- func (self *SqlBackend) QueryFunc(collection *dal.Collection, f *filter.Filter, resultFn IndexResultFunc) error
- func (self *SqlBackend) RegisterCollection(collection *dal.Collection)
- func (self *SqlBackend) Retrieve(name string, id interface{}, fields ...string) (*dal.Record, error)
- func (self *SqlBackend) SetIndexer(indexConnString dal.ConnectionString) error
- func (self *SqlBackend) String() string
- func (self *SqlBackend) Sum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
- func (self *SqlBackend) Update(name string, recordset *dal.RecordSet, target ...string) error
- func (self *SqlBackend) WithAggregator(collection *dal.Collection) Aggregator
- func (self *SqlBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
- type WrappedIndexer
- func (self *WrappedIndexer) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
- func (self *WrappedIndexer) FlushIndex() error
- func (self *WrappedIndexer) GetBackend() Backend
- func (self *WrappedIndexer) Index(collection *dal.Collection, records *dal.RecordSet) error
- func (self *WrappedIndexer) IndexConnectionString() *dal.ConnectionString
- func (self *WrappedIndexer) IndexExists(collection *dal.Collection, id interface{}) bool
- func (self *WrappedIndexer) IndexInitialize(b Backend) error
- func (self *WrappedIndexer) IndexRemove(collection *dal.Collection, ids []interface{}) error
- func (self *WrappedIndexer) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
- func (self *WrappedIndexer) ListValues(collection *dal.Collection, fields []string, filter *filter.Filter) (map[string][]interface{}, error)
- func (self *WrappedIndexer) Query(collection *dal.Collection, filter *filter.Filter, ...) (*dal.RecordSet, error)
- func (self *WrappedIndexer) QueryFunc(collection *dal.Collection, filter *filter.Filter, resultFn IndexResultFunc) error
Constants ¶
View Source
const ( FormatYAML SerializationFormat = `yaml` FormatJSON = `json` FormatCSV = `csv` )
View Source
const DefaultFilesystemRecordSubdirectory = `data`
Variables ¶
View Source
var BleveBatchFlushCount = 1
View Source
var BleveBatchFlushInterval = 10 * time.Second
View Source
var BleveIdentityField = `_id`
View Source
var DefaultAmazonRegion = `us-east-1`
View Source
var DefaultAutoregister = false
View Source
var DefaultCompoundJoiner = `:`
View Source
var DefaultConnectTimeout = 10 * time.Second
View Source
var ElasticsearchBatchFlushCount = 1
View Source
var ElasticsearchBatchFlushInterval = 10 * time.Second
View Source
var ElasticsearchConnectTimeout = 3 * time.Second
View Source
var ElasticsearchDocumentType = `document`
View Source
var ElasticsearchIdentityField = `_id`
View Source
var ElasticsearchRequestTimeout = 30 * time.Second
View Source
var ElasticsearchResponseHeaderTimeout = 10 * time.Second
View Source
var ElasticsearchTLSTimeout = 10 * time.Second
View Source
var FilesystemRecordCacheSize = 1024
View Source
var IndexerPageSize int = 100
View Source
var IndexerResultsStop = fmt.Errorf(`stop indexer results`)
View Source
var InitialPingTimeout = time.Duration(10) * time.Second
View Source
var MaxFacetCardinality int = 10000
View Source
var MongoIdentityField = `_id`
View Source
var NotImplementedError = fmt.Errorf("Not Implemented")
View Source
var RecordCacheEnabled = false
View Source
var RedisDefaultAddress = `localhost:6379`
View Source
var RedisDefaultProtocol = `tcp`
View Source
var WriteLockFormat = `%s.lock`
Functions ¶
func DefaultQueryImplementation ¶
func DefaultQueryImplementation(indexer Indexer, collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func InflateEmbeddedRecords ¶
func RegisterBackend ¶
func RegisterBackend(name string, fn BackendFunc)
Types ¶
type Aggregator ¶
type Aggregator interface { AggregatorConnectionString() *dal.ConnectionString AggregatorInitialize(Backend) error Sum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error) Count(collection *dal.Collection, f ...*filter.Filter) (uint64, error) Minimum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error) Maximum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error) Average(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error) GroupBy(collection *dal.Collection, fields []string, aggregates []filter.Aggregate, f ...*filter.Filter) (*dal.RecordSet, error) }
type Backend ¶
type Backend interface { Initialize() error SetIndexer(dal.ConnectionString) error RegisterCollection(*dal.Collection) GetConnectionString() *dal.ConnectionString Exists(collection string, id interface{}) bool Retrieve(collection string, id interface{}, fields ...string) (*dal.Record, error) Insert(collection string, records *dal.RecordSet) error Update(collection string, records *dal.RecordSet, target ...string) error Delete(collection string, ids ...interface{}) error CreateCollection(definition *dal.Collection) error DeleteCollection(collection string) error ListCollections() ([]string, error) GetCollection(collection string) (*dal.Collection, error) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer WithAggregator(collection *dal.Collection) Aggregator Flush() error Ping(time.Duration) error String() string }
func MakeBackend ¶
func MakeBackend(connection dal.ConnectionString) (Backend, error)
func NewDynamoBackend ¶
func NewDynamoBackend(connection dal.ConnectionString) Backend
func NewFilesystemBackend ¶
func NewFilesystemBackend(connection dal.ConnectionString) Backend
func NewMongoBackend ¶
func NewMongoBackend(connection dal.ConnectionString) Backend
func NewRedisBackend ¶
func NewRedisBackend(connection dal.ConnectionString) Backend
func NewSqlBackend ¶
func NewSqlBackend(connection dal.ConnectionString) Backend
type BackendFunc ¶
type BackendFunc func(dal.ConnectionString) Backend
type BleveIndexer ¶
type BleveIndexer struct { Indexer // contains filtered or unexported fields }
func NewBleveIndexer ¶
func NewBleveIndexer(connection dal.ConnectionString) *BleveIndexer
func (*BleveIndexer) DeleteQuery ¶
func (self *BleveIndexer) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
func (*BleveIndexer) FlushIndex ¶
func (self *BleveIndexer) FlushIndex() error
func (*BleveIndexer) GetBackend ¶
func (self *BleveIndexer) GetBackend() Backend
func (*BleveIndexer) Index ¶
func (self *BleveIndexer) Index(collection *dal.Collection, records *dal.RecordSet) error
func (*BleveIndexer) IndexConnectionString ¶
func (self *BleveIndexer) IndexConnectionString() *dal.ConnectionString
func (*BleveIndexer) IndexExists ¶
func (self *BleveIndexer) IndexExists(collection *dal.Collection, id interface{}) bool
func (*BleveIndexer) IndexInitialize ¶
func (self *BleveIndexer) IndexInitialize(parent Backend) error
func (*BleveIndexer) IndexRemove ¶
func (self *BleveIndexer) IndexRemove(collection *dal.Collection, ids []interface{}) error
func (*BleveIndexer) IndexRetrieve ¶
func (self *BleveIndexer) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
func (*BleveIndexer) ListValues ¶
func (self *BleveIndexer) ListValues(collection *dal.Collection, fields []string, f *filter.Filter) (map[string][]interface{}, error)
func (*BleveIndexer) Query ¶
func (self *BleveIndexer) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func (*BleveIndexer) QueryFunc ¶
func (self *BleveIndexer) QueryFunc(collection *dal.Collection, f *filter.Filter, resultFn IndexResultFunc) error
type CachingBackend ¶
type CachingBackend struct {
// contains filtered or unexported fields
}
func NewCachingBackend ¶
func NewCachingBackend(parent Backend) *CachingBackend
func (*CachingBackend) CreateCollection ¶
func (self *CachingBackend) CreateCollection(definition *dal.Collection) error
func (*CachingBackend) Delete ¶
func (self *CachingBackend) Delete(collection string, ids ...interface{}) error
func (*CachingBackend) DeleteCollection ¶
func (self *CachingBackend) DeleteCollection(collection string) error
func (*CachingBackend) Exists ¶
func (self *CachingBackend) Exists(collection string, id interface{}) bool
passthrough the remaining functions to fulfill the Backend interface -------------------------------------------------------------------------------------------------
func (*CachingBackend) Flush ¶
func (self *CachingBackend) Flush() error
func (*CachingBackend) GetCollection ¶
func (self *CachingBackend) GetCollection(collection string) (*dal.Collection, error)
func (*CachingBackend) GetConnectionString ¶
func (self *CachingBackend) GetConnectionString() *dal.ConnectionString
func (*CachingBackend) Initialize ¶
func (self *CachingBackend) Initialize() error
func (*CachingBackend) Insert ¶
func (self *CachingBackend) Insert(collection string, records *dal.RecordSet) error
func (*CachingBackend) ListCollections ¶
func (self *CachingBackend) ListCollections() ([]string, error)
func (*CachingBackend) RegisterCollection ¶
func (self *CachingBackend) RegisterCollection(c *dal.Collection)
func (*CachingBackend) ResetCache ¶
func (self *CachingBackend) ResetCache()
func (*CachingBackend) SetIndexer ¶
func (self *CachingBackend) SetIndexer(cs dal.ConnectionString) error
func (*CachingBackend) String ¶
func (self *CachingBackend) String() string
func (*CachingBackend) WithAggregator ¶
func (self *CachingBackend) WithAggregator(collection *dal.Collection) Aggregator
func (*CachingBackend) WithSearch ¶
func (self *CachingBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
type ConnectOptions ¶
type DynamoBackend ¶
func (*DynamoBackend) CreateCollection ¶
func (self *DynamoBackend) CreateCollection(definition *dal.Collection) error
func (*DynamoBackend) Delete ¶
func (self *DynamoBackend) Delete(name string, ids ...interface{}) error
func (*DynamoBackend) DeleteCollection ¶
func (self *DynamoBackend) DeleteCollection(name string) error
func (*DynamoBackend) DeleteQuery ¶
func (self *DynamoBackend) DeleteQuery(collection *dal.Collection, flt *filter.Filter) error
func (*DynamoBackend) Exists ¶
func (self *DynamoBackend) Exists(name string, id interface{}) bool
func (*DynamoBackend) Flush ¶
func (self *DynamoBackend) Flush() error
func (*DynamoBackend) FlushIndex ¶
func (self *DynamoBackend) FlushIndex() error
func (*DynamoBackend) GetBackend ¶
func (self *DynamoBackend) GetBackend() Backend
func (*DynamoBackend) GetCollection ¶
func (self *DynamoBackend) GetCollection(name string) (*dal.Collection, error)
func (*DynamoBackend) GetConnectionString ¶
func (self *DynamoBackend) GetConnectionString() *dal.ConnectionString
func (*DynamoBackend) Index ¶
func (self *DynamoBackend) Index(collection *dal.Collection, records *dal.RecordSet) error
func (*DynamoBackend) IndexConnectionString ¶
func (self *DynamoBackend) IndexConnectionString() *dal.ConnectionString
func (*DynamoBackend) IndexExists ¶
func (self *DynamoBackend) IndexExists(collection *dal.Collection, id interface{}) bool
func (*DynamoBackend) IndexInitialize ¶
func (self *DynamoBackend) IndexInitialize(Backend) error
func (*DynamoBackend) IndexRemove ¶
func (self *DynamoBackend) IndexRemove(collection *dal.Collection, ids []interface{}) error
func (*DynamoBackend) IndexRetrieve ¶
func (self *DynamoBackend) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
func (*DynamoBackend) Initialize ¶
func (self *DynamoBackend) Initialize() error
func (*DynamoBackend) Insert ¶
func (self *DynamoBackend) Insert(name string, records *dal.RecordSet) error
func (*DynamoBackend) ListCollections ¶
func (self *DynamoBackend) ListCollections() ([]string, error)
func (*DynamoBackend) ListValues ¶
func (self *DynamoBackend) ListValues(collection *dal.Collection, fields []string, flt *filter.Filter) (map[string][]interface{}, error)
func (*DynamoBackend) Query ¶
func (self *DynamoBackend) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func (*DynamoBackend) QueryFunc ¶
func (self *DynamoBackend) QueryFunc(collection *dal.Collection, flt *filter.Filter, resultFn IndexResultFunc) error
func (*DynamoBackend) RegisterCollection ¶
func (self *DynamoBackend) RegisterCollection(definition *dal.Collection)
func (*DynamoBackend) SetIndexer ¶
func (self *DynamoBackend) SetIndexer(indexConnString dal.ConnectionString) error
func (*DynamoBackend) String ¶
func (self *DynamoBackend) String() string
func (*DynamoBackend) WithAggregator ¶
func (self *DynamoBackend) WithAggregator(collection *dal.Collection) Aggregator
func (*DynamoBackend) WithSearch ¶
func (self *DynamoBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
type ElasticsearchIndexer ¶
type ElasticsearchIndexer struct { Indexer // contains filtered or unexported fields }
func NewElasticsearchIndexer ¶
func NewElasticsearchIndexer(connection dal.ConnectionString) *ElasticsearchIndexer
func (*ElasticsearchIndexer) AggregatorConnectionString ¶
func (self *ElasticsearchIndexer) AggregatorConnectionString() *dal.ConnectionString
func (*ElasticsearchIndexer) AggregatorInitialize ¶
func (self *ElasticsearchIndexer) AggregatorInitialize(parent Backend) error
func (*ElasticsearchIndexer) Average ¶
func (self *ElasticsearchIndexer) Average(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
func (*ElasticsearchIndexer) Count ¶
func (self *ElasticsearchIndexer) Count(collection *dal.Collection, flt ...*filter.Filter) (uint64, error)
func (*ElasticsearchIndexer) DeleteQuery ¶
func (self *ElasticsearchIndexer) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
func (*ElasticsearchIndexer) FlushIndex ¶
func (self *ElasticsearchIndexer) FlushIndex() error
func (*ElasticsearchIndexer) GetBackend ¶
func (self *ElasticsearchIndexer) GetBackend() Backend
func (*ElasticsearchIndexer) Index ¶
func (self *ElasticsearchIndexer) Index(collection *dal.Collection, records *dal.RecordSet) error
func (*ElasticsearchIndexer) IndexConnectionString ¶
func (self *ElasticsearchIndexer) IndexConnectionString() *dal.ConnectionString
func (*ElasticsearchIndexer) IndexExists ¶
func (self *ElasticsearchIndexer) IndexExists(collection *dal.Collection, id interface{}) bool
func (*ElasticsearchIndexer) IndexInitialize ¶
func (self *ElasticsearchIndexer) IndexInitialize(parent Backend) error
func (*ElasticsearchIndexer) IndexRemove ¶
func (self *ElasticsearchIndexer) IndexRemove(collection *dal.Collection, ids []interface{}) error
func (*ElasticsearchIndexer) IndexRetrieve ¶
func (self *ElasticsearchIndexer) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
func (*ElasticsearchIndexer) ListValues ¶
func (self *ElasticsearchIndexer) ListValues(collection *dal.Collection, fields []string, f *filter.Filter) (map[string][]interface{}, error)
func (*ElasticsearchIndexer) Maximum ¶
func (self *ElasticsearchIndexer) Maximum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
func (*ElasticsearchIndexer) Minimum ¶
func (self *ElasticsearchIndexer) Minimum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
func (*ElasticsearchIndexer) Query ¶
func (self *ElasticsearchIndexer) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func (*ElasticsearchIndexer) QueryFunc ¶
func (self *ElasticsearchIndexer) QueryFunc(collection *dal.Collection, f *filter.Filter, resultFn IndexResultFunc) error
func (*ElasticsearchIndexer) Sum ¶
func (self *ElasticsearchIndexer) Sum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
type EmbeddedRecordBackend ¶
type EmbeddedRecordBackend struct {
// contains filtered or unexported fields
}
func NewEmbeddedRecordBackend ¶
func NewEmbeddedRecordBackend(parent Backend) *EmbeddedRecordBackend
func (*EmbeddedRecordBackend) CreateCollection ¶
func (self *EmbeddedRecordBackend) CreateCollection(definition *dal.Collection) error
func (*EmbeddedRecordBackend) Delete ¶
func (self *EmbeddedRecordBackend) Delete(collection string, ids ...interface{}) error
func (*EmbeddedRecordBackend) DeleteCollection ¶
func (self *EmbeddedRecordBackend) DeleteCollection(collection string) error
func (*EmbeddedRecordBackend) Exists ¶
func (self *EmbeddedRecordBackend) Exists(collection string, id interface{}) bool
passthrough the remaining functions to fulfill the Backend interface -------------------------------------------------------------------------------------------------
func (*EmbeddedRecordBackend) Flush ¶
func (self *EmbeddedRecordBackend) Flush() error
func (*EmbeddedRecordBackend) GetCollection ¶
func (self *EmbeddedRecordBackend) GetCollection(collection string) (*dal.Collection, error)
func (*EmbeddedRecordBackend) GetConnectionString ¶
func (self *EmbeddedRecordBackend) GetConnectionString() *dal.ConnectionString
func (*EmbeddedRecordBackend) Inflate ¶
func (self *EmbeddedRecordBackend) Inflate(collection *dal.Collection, record *dal.Record) (*dal.Record, error)
func (*EmbeddedRecordBackend) Initialize ¶
func (self *EmbeddedRecordBackend) Initialize() error
func (*EmbeddedRecordBackend) Insert ¶
func (self *EmbeddedRecordBackend) Insert(collection string, records *dal.RecordSet) error
func (*EmbeddedRecordBackend) ListCollections ¶
func (self *EmbeddedRecordBackend) ListCollections() ([]string, error)
func (*EmbeddedRecordBackend) RegisterCollection ¶
func (self *EmbeddedRecordBackend) RegisterCollection(c *dal.Collection)
func (*EmbeddedRecordBackend) SetIndexer ¶
func (self *EmbeddedRecordBackend) SetIndexer(cs dal.ConnectionString) error
func (*EmbeddedRecordBackend) String ¶
func (self *EmbeddedRecordBackend) String() string
func (*EmbeddedRecordBackend) WithAggregator ¶
func (self *EmbeddedRecordBackend) WithAggregator(collection *dal.Collection) Aggregator
func (*EmbeddedRecordBackend) WithSearch ¶
func (self *EmbeddedRecordBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
type FilesystemBackend ¶
func (*FilesystemBackend) CreateCollection ¶
func (self *FilesystemBackend) CreateCollection(definition *dal.Collection) error
func (*FilesystemBackend) Delete ¶
func (self *FilesystemBackend) Delete(name string, ids ...interface{}) error
func (*FilesystemBackend) DeleteCollection ¶
func (self *FilesystemBackend) DeleteCollection(name string) error
func (*FilesystemBackend) DeleteQuery ¶
func (self *FilesystemBackend) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
func (*FilesystemBackend) Exists ¶
func (self *FilesystemBackend) Exists(name string, id interface{}) bool
func (*FilesystemBackend) Flush ¶
func (self *FilesystemBackend) Flush() error
func (*FilesystemBackend) FlushIndex ¶
func (self *FilesystemBackend) FlushIndex() error
func (*FilesystemBackend) GetBackend ¶
func (self *FilesystemBackend) GetBackend() Backend
func (*FilesystemBackend) GetCollection ¶
func (self *FilesystemBackend) GetCollection(name string) (*dal.Collection, error)
func (*FilesystemBackend) GetConnectionString ¶
func (self *FilesystemBackend) GetConnectionString() *dal.ConnectionString
func (*FilesystemBackend) Index ¶
func (self *FilesystemBackend) Index(collection *dal.Collection, records *dal.RecordSet) error
func (*FilesystemBackend) IndexConnectionString ¶
func (self *FilesystemBackend) IndexConnectionString() *dal.ConnectionString
func (*FilesystemBackend) IndexExists ¶
func (self *FilesystemBackend) IndexExists(collection *dal.Collection, id interface{}) bool
func (*FilesystemBackend) IndexInitialize ¶
func (self *FilesystemBackend) IndexInitialize(_ Backend) error
func (*FilesystemBackend) IndexRemove ¶
func (self *FilesystemBackend) IndexRemove(collection *dal.Collection, ids []interface{}) error
func (*FilesystemBackend) IndexRetrieve ¶
func (self *FilesystemBackend) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
func (*FilesystemBackend) Initialize ¶
func (self *FilesystemBackend) Initialize() error
func (*FilesystemBackend) Insert ¶
func (self *FilesystemBackend) Insert(collectionName string, recordset *dal.RecordSet) error
func (*FilesystemBackend) ListCollections ¶
func (self *FilesystemBackend) ListCollections() ([]string, error)
func (*FilesystemBackend) ListValues ¶
func (self *FilesystemBackend) ListValues(collection *dal.Collection, fields []string, f *filter.Filter) (map[string][]interface{}, error)
func (*FilesystemBackend) Query ¶
func (self *FilesystemBackend) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func (*FilesystemBackend) QueryFunc ¶
func (self *FilesystemBackend) QueryFunc(collection *dal.Collection, filter *filter.Filter, resultFn IndexResultFunc) error
func (*FilesystemBackend) RegisterCollection ¶
func (self *FilesystemBackend) RegisterCollection(collection *dal.Collection)
func (*FilesystemBackend) SetIndexer ¶
func (self *FilesystemBackend) SetIndexer(indexConnString dal.ConnectionString) error
func (*FilesystemBackend) String ¶
func (self *FilesystemBackend) String() string
func (*FilesystemBackend) WithAggregator ¶
func (self *FilesystemBackend) WithAggregator(collection *dal.Collection) Aggregator
func (*FilesystemBackend) WithSearch ¶
func (self *FilesystemBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
type IndexOperation ¶
type IndexOperation int
const ( RetrieveOperation IndexOperation = iota PersistOperation DeleteOperation InspectionOperation )
type IndexResultFunc ¶
type IndexSelectionStrategy ¶
type IndexSelectionStrategy int
const ( Sequential IndexSelectionStrategy = iota All First AllExceptFirst Random )
func (IndexSelectionStrategy) IsCompoundable ¶
func (self IndexSelectionStrategy) IsCompoundable() bool
type Indexer ¶
type Indexer interface { IndexConnectionString() *dal.ConnectionString IndexInitialize(Backend) error IndexExists(collection *dal.Collection, id interface{}) bool IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error) IndexRemove(collection *dal.Collection, ids []interface{}) error Index(collection *dal.Collection, records *dal.RecordSet) error QueryFunc(collection *dal.Collection, filter *filter.Filter, resultFn IndexResultFunc) error Query(collection *dal.Collection, filter *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error) ListValues(collection *dal.Collection, fields []string, filter *filter.Filter) (map[string][]interface{}, error) DeleteQuery(collection *dal.Collection, f *filter.Filter) error FlushIndex() error GetBackend() Backend }
func MakeIndexer ¶
func MakeIndexer(connection dal.ConnectionString) (Indexer, error)
type IndexerResult ¶
type IndexerResultFunc ¶
type MetaIndex ¶
type MetaIndex struct {
// contains filtered or unexported fields
}
func NewMetaIndex ¶
func NewMetaIndex(leftIndexer Indexer, leftCollection *dal.Collection, leftField string, rightIndexer Indexer, rightCollection *dal.Collection, rightField string) *MetaIndex
func (*MetaIndex) DeleteQuery ¶
func (*MetaIndex) FlushIndex ¶
func (*MetaIndex) GetBackend ¶
func (*MetaIndex) IndexConnectionString ¶
func (self *MetaIndex) IndexConnectionString() *dal.ConnectionString
func (*MetaIndex) IndexExists ¶
func (self *MetaIndex) IndexExists(collection *dal.Collection, id interface{}) bool
func (*MetaIndex) IndexInitialize ¶
func (*MetaIndex) IndexRemove ¶
func (self *MetaIndex) IndexRemove(collection *dal.Collection, ids []interface{}) error
func (*MetaIndex) IndexRetrieve ¶
func (*MetaIndex) ListValues ¶
func (*MetaIndex) Query ¶
func (self *MetaIndex) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func (*MetaIndex) QueryFunc ¶
func (self *MetaIndex) QueryFunc(collection *dal.Collection, f *filter.Filter, resultFn IndexResultFunc) error
type Migratable ¶
type Migratable interface {
Migrate(diff []dal.SchemaDelta) error
}
type MongoBackend ¶
func (*MongoBackend) AggregatorConnectionString ¶
func (self *MongoBackend) AggregatorConnectionString() *dal.ConnectionString
func (*MongoBackend) AggregatorInitialize ¶
func (self *MongoBackend) AggregatorInitialize(parent Backend) error
func (*MongoBackend) Average ¶
func (self *MongoBackend) Average(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
func (*MongoBackend) Count ¶
func (self *MongoBackend) Count(collection *dal.Collection, flt ...*filter.Filter) (uint64, error)
func (*MongoBackend) CreateCollection ¶
func (self *MongoBackend) CreateCollection(definition *dal.Collection) error
func (*MongoBackend) Delete ¶
func (self *MongoBackend) Delete(name string, ids ...interface{}) error
func (*MongoBackend) DeleteCollection ¶
func (self *MongoBackend) DeleteCollection(name string) error
func (*MongoBackend) DeleteQuery ¶
func (self *MongoBackend) DeleteQuery(collection *dal.Collection, flt *filter.Filter) error
func (*MongoBackend) Exists ¶
func (self *MongoBackend) Exists(name string, id interface{}) bool
func (*MongoBackend) Flush ¶
func (self *MongoBackend) Flush() error
func (*MongoBackend) FlushIndex ¶
func (self *MongoBackend) FlushIndex() error
func (*MongoBackend) GetBackend ¶
func (self *MongoBackend) GetBackend() Backend
func (*MongoBackend) GetCollection ¶
func (self *MongoBackend) GetCollection(name string) (*dal.Collection, error)
func (*MongoBackend) GetConnectionString ¶
func (self *MongoBackend) GetConnectionString() *dal.ConnectionString
func (*MongoBackend) Index ¶
func (self *MongoBackend) Index(collection *dal.Collection, records *dal.RecordSet) error
func (*MongoBackend) IndexConnectionString ¶
func (self *MongoBackend) IndexConnectionString() *dal.ConnectionString
func (*MongoBackend) IndexExists ¶
func (self *MongoBackend) IndexExists(collection *dal.Collection, id interface{}) bool
func (*MongoBackend) IndexInitialize ¶
func (self *MongoBackend) IndexInitialize(Backend) error
func (*MongoBackend) IndexRemove ¶
func (self *MongoBackend) IndexRemove(collection *dal.Collection, ids []interface{}) error
func (*MongoBackend) IndexRetrieve ¶
func (self *MongoBackend) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
func (*MongoBackend) Initialize ¶
func (self *MongoBackend) Initialize() error
func (*MongoBackend) Insert ¶
func (self *MongoBackend) Insert(name string, records *dal.RecordSet) error
func (*MongoBackend) ListCollections ¶
func (self *MongoBackend) ListCollections() ([]string, error)
func (*MongoBackend) ListValues ¶
func (self *MongoBackend) ListValues(collection *dal.Collection, fields []string, flt *filter.Filter) (map[string][]interface{}, error)
func (*MongoBackend) Maximum ¶
func (self *MongoBackend) Maximum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
func (*MongoBackend) Minimum ¶
func (self *MongoBackend) Minimum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
func (*MongoBackend) Query ¶
func (self *MongoBackend) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func (*MongoBackend) QueryFunc ¶
func (self *MongoBackend) QueryFunc(collection *dal.Collection, flt *filter.Filter, resultFn IndexResultFunc) error
func (*MongoBackend) RegisterCollection ¶
func (self *MongoBackend) RegisterCollection(collection *dal.Collection)
func (*MongoBackend) SetIndexer ¶
func (self *MongoBackend) SetIndexer(indexConnString dal.ConnectionString) error
func (*MongoBackend) String ¶
func (self *MongoBackend) String() string
func (*MongoBackend) Sum ¶
func (self *MongoBackend) Sum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
func (*MongoBackend) WithAggregator ¶
func (self *MongoBackend) WithAggregator(collection *dal.Collection) Aggregator
func (*MongoBackend) WithSearch ¶
func (self *MongoBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
type MultiIndex ¶
type MultiIndex struct { RetrievalStrategy IndexSelectionStrategy PersistStrategy IndexSelectionStrategy DeleteStrategy IndexSelectionStrategy InspectionStrategy IndexSelectionStrategy // contains filtered or unexported fields }
func NewMultiIndex ¶
func NewMultiIndex(connectionStrings ...string) *MultiIndex
func (*MultiIndex) AddIndexer ¶
func (self *MultiIndex) AddIndexer(indexer Indexer) error
func (*MultiIndex) AddIndexerByConnectionString ¶
func (self *MultiIndex) AddIndexerByConnectionString(cs string) error
func (*MultiIndex) DeleteQuery ¶
func (self *MultiIndex) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
func (*MultiIndex) EachSelectedIndex ¶
func (self *MultiIndex) EachSelectedIndex(collection *dal.Collection, operation IndexOperation, resultFn IndexerResultFunc) error
func (*MultiIndex) FlushIndex ¶
func (self *MultiIndex) FlushIndex() error
func (*MultiIndex) GetBackend ¶
func (self *MultiIndex) GetBackend() Backend
func (*MultiIndex) Index ¶
func (self *MultiIndex) Index(collection *dal.Collection, records *dal.RecordSet) error
func (*MultiIndex) IndexConnectionString ¶
func (self *MultiIndex) IndexConnectionString() *dal.ConnectionString
func (*MultiIndex) IndexExists ¶
func (self *MultiIndex) IndexExists(collection *dal.Collection, id interface{}) bool
func (*MultiIndex) IndexInitialize ¶
func (self *MultiIndex) IndexInitialize(backend Backend) error
func (*MultiIndex) IndexRemove ¶
func (self *MultiIndex) IndexRemove(collection *dal.Collection, ids []interface{}) error
func (*MultiIndex) IndexRetrieve ¶
func (self *MultiIndex) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
func (*MultiIndex) ListValues ¶
func (self *MultiIndex) ListValues(collection *dal.Collection, fields []string, filter *filter.Filter) (map[string][]interface{}, error)
func (*MultiIndex) Query ¶
func (self *MultiIndex) Query(collection *dal.Collection, filter *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func (*MultiIndex) QueryFunc ¶
func (self *MultiIndex) QueryFunc(collection *dal.Collection, filter *filter.Filter, resultFn IndexResultFunc) error
func (*MultiIndex) SelectIndex ¶
func (self *MultiIndex) SelectIndex(collection *dal.Collection, operation IndexOperation, lastIndexer int) ([]IndexerResult, error)
type NullIndexer ¶
type NullIndexer struct { }
func (*NullIndexer) DeleteQuery ¶
func (self *NullIndexer) DeleteQuery(collection *dal.Collection, f filter.Filter) error
func (*NullIndexer) FlushIndex ¶
func (self *NullIndexer) FlushIndex() error
func (*NullIndexer) GetBackend ¶
func (self *NullIndexer) GetBackend() Backend
func (*NullIndexer) Index ¶
func (self *NullIndexer) Index(collection *dal.Collection, records *dal.RecordSet) error
func (*NullIndexer) IndexConnectionString ¶
func (self *NullIndexer) IndexConnectionString() *dal.ConnectionString
func (*NullIndexer) IndexExists ¶
func (self *NullIndexer) IndexExists(collection *dal.Collection, id interface{}) bool
func (*NullIndexer) IndexInitialize ¶
func (self *NullIndexer) IndexInitialize(Backend) error
func (*NullIndexer) IndexRemove ¶
func (self *NullIndexer) IndexRemove(collection *dal.Collection, ids []interface{}) error
func (*NullIndexer) IndexRetrieve ¶
func (self *NullIndexer) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
func (*NullIndexer) ListValues ¶
func (self *NullIndexer) ListValues(collection *dal.Collection, fields []string, filter filter.Filter) (map[string][]interface{}, error)
func (*NullIndexer) Query ¶
func (self *NullIndexer) Query(collection *dal.Collection, filter filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func (*NullIndexer) QueryFunc ¶
func (self *NullIndexer) QueryFunc(collection *dal.Collection, filter filter.Filter, resultFn IndexResultFunc) error
type RedisBackend ¶
type RedisBackend struct { Backend // contains filtered or unexported fields }
func (*RedisBackend) CreateCollection ¶
func (self *RedisBackend) CreateCollection(definition *dal.Collection) error
func (*RedisBackend) Delete ¶
func (self *RedisBackend) Delete(name string, ids ...interface{}) error
func (*RedisBackend) DeleteCollection ¶
func (self *RedisBackend) DeleteCollection(name string) error
func (*RedisBackend) DeleteQuery ¶ added in v3.0.7
func (self *RedisBackend) DeleteQuery(collection *dal.Collection, flt *filter.Filter) error
func (*RedisBackend) Exists ¶
func (self *RedisBackend) Exists(name string, id interface{}) bool
func (*RedisBackend) Flush ¶
func (self *RedisBackend) Flush() error
func (*RedisBackend) FlushIndex ¶ added in v3.0.7
func (self *RedisBackend) FlushIndex() error
func (*RedisBackend) GetBackend ¶ added in v3.0.7
func (self *RedisBackend) GetBackend() Backend
func (*RedisBackend) GetCollection ¶
func (self *RedisBackend) GetCollection(name string) (*dal.Collection, error)
func (*RedisBackend) GetConnectionString ¶
func (self *RedisBackend) GetConnectionString() *dal.ConnectionString
func (*RedisBackend) Index ¶ added in v3.0.7
func (self *RedisBackend) Index(collection *dal.Collection, records *dal.RecordSet) error
func (*RedisBackend) IndexConnectionString ¶ added in v3.0.7
func (self *RedisBackend) IndexConnectionString() *dal.ConnectionString
func (*RedisBackend) IndexExists ¶ added in v3.0.7
func (self *RedisBackend) IndexExists(collection *dal.Collection, id interface{}) bool
func (*RedisBackend) IndexInitialize ¶ added in v3.0.7
func (self *RedisBackend) IndexInitialize(Backend) error
func (*RedisBackend) IndexRemove ¶ added in v3.0.7
func (self *RedisBackend) IndexRemove(collection *dal.Collection, ids []interface{}) error
func (*RedisBackend) IndexRetrieve ¶ added in v3.0.7
func (self *RedisBackend) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
func (*RedisBackend) Initialize ¶
func (self *RedisBackend) Initialize() error
func (*RedisBackend) Insert ¶
func (self *RedisBackend) Insert(name string, recordset *dal.RecordSet) error
func (*RedisBackend) ListCollections ¶
func (self *RedisBackend) ListCollections() ([]string, error)
func (*RedisBackend) ListValues ¶ added in v3.0.7
func (self *RedisBackend) ListValues(collection *dal.Collection, fields []string, flt *filter.Filter) (map[string][]interface{}, error)
func (*RedisBackend) Query ¶ added in v3.0.7
func (self *RedisBackend) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func (*RedisBackend) QueryFunc ¶ added in v3.0.7
func (self *RedisBackend) QueryFunc(collection *dal.Collection, flt *filter.Filter, resultFn IndexResultFunc) error
func (*RedisBackend) RegisterCollection ¶
func (self *RedisBackend) RegisterCollection(collection *dal.Collection)
func (*RedisBackend) SetIndexer ¶
func (self *RedisBackend) SetIndexer(indexConnString dal.ConnectionString) error
func (*RedisBackend) String ¶
func (self *RedisBackend) String() string
func (*RedisBackend) WithAggregator ¶
func (self *RedisBackend) WithAggregator(collection *dal.Collection) Aggregator
func (*RedisBackend) WithSearch ¶
func (self *RedisBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
type SerializationFormat ¶
type SerializationFormat string
type SqlBackend ¶
type SqlBackend struct { Backend Indexer Aggregator // contains filtered or unexported fields }
func (*SqlBackend) AggregatorConnectionString ¶
func (self *SqlBackend) AggregatorConnectionString() *dal.ConnectionString
func (*SqlBackend) AggregatorInitialize ¶
func (self *SqlBackend) AggregatorInitialize(parent Backend) error
func (*SqlBackend) Average ¶
func (self *SqlBackend) Average(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
func (*SqlBackend) Count ¶
func (self *SqlBackend) Count(collection *dal.Collection, f ...*filter.Filter) (uint64, error)
func (*SqlBackend) CreateCollection ¶
func (self *SqlBackend) CreateCollection(definition *dal.Collection) error
func (*SqlBackend) Delete ¶
func (self *SqlBackend) Delete(name string, ids ...interface{}) error
func (*SqlBackend) DeleteCollection ¶
func (self *SqlBackend) DeleteCollection(collectionName string) error
func (*SqlBackend) DeleteQuery ¶
func (self *SqlBackend) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
DeleteQuery removes records using a filter
func (*SqlBackend) Exists ¶
func (self *SqlBackend) Exists(name string, id interface{}) bool
func (*SqlBackend) Flush ¶
func (self *SqlBackend) Flush() error
func (*SqlBackend) FlushIndex ¶
func (self *SqlBackend) FlushIndex() error
func (*SqlBackend) GetBackend ¶
func (self *SqlBackend) GetBackend() Backend
func (*SqlBackend) GetCollection ¶
func (self *SqlBackend) GetCollection(name string) (*dal.Collection, error)
func (*SqlBackend) GetConnectionString ¶
func (self *SqlBackend) GetConnectionString() *dal.ConnectionString
func (*SqlBackend) Index ¶
func (self *SqlBackend) Index(collection *dal.Collection, records *dal.RecordSet) error
Index is a no-op, this should be handled by SqlBackend's Insert() function
func (*SqlBackend) IndexConnectionString ¶
func (self *SqlBackend) IndexConnectionString() *dal.ConnectionString
func (*SqlBackend) IndexExists ¶
func (self *SqlBackend) IndexExists(collection *dal.Collection, id interface{}) bool
func (*SqlBackend) IndexInitialize ¶
func (self *SqlBackend) IndexInitialize(parent Backend) error
func (*SqlBackend) IndexRemove ¶
func (self *SqlBackend) IndexRemove(collection *dal.Collection, ids []interface{}) error
IndexRemove is a no-op, this should be handled by SqlBackend's Delete() function
func (*SqlBackend) IndexRetrieve ¶
func (self *SqlBackend) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
func (*SqlBackend) Initialize ¶
func (self *SqlBackend) Initialize() error
func (*SqlBackend) Insert ¶
func (self *SqlBackend) Insert(name string, recordset *dal.RecordSet) error
func (*SqlBackend) ListCollections ¶
func (self *SqlBackend) ListCollections() ([]string, error)
func (*SqlBackend) ListValues ¶
func (self *SqlBackend) ListValues(collection *dal.Collection, fields []string, f *filter.Filter) (map[string][]interface{}, error)
func (*SqlBackend) Maximum ¶
func (self *SqlBackend) Maximum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
func (*SqlBackend) Minimum ¶
func (self *SqlBackend) Minimum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
func (*SqlBackend) Query ¶
func (self *SqlBackend) Query(collection *dal.Collection, f *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func (*SqlBackend) QueryFunc ¶
func (self *SqlBackend) QueryFunc(collection *dal.Collection, f *filter.Filter, resultFn IndexResultFunc) error
func (*SqlBackend) RegisterCollection ¶
func (self *SqlBackend) RegisterCollection(collection *dal.Collection)
func (*SqlBackend) SetIndexer ¶
func (self *SqlBackend) SetIndexer(indexConnString dal.ConnectionString) error
func (*SqlBackend) String ¶
func (self *SqlBackend) String() string
func (*SqlBackend) Sum ¶
func (self *SqlBackend) Sum(collection *dal.Collection, field string, f ...*filter.Filter) (float64, error)
func (*SqlBackend) WithAggregator ¶
func (self *SqlBackend) WithAggregator(collection *dal.Collection) Aggregator
func (*SqlBackend) WithSearch ¶
func (self *SqlBackend) WithSearch(collection *dal.Collection, filters ...*filter.Filter) Indexer
type WrappedIndexer ¶
type WrappedIndexer struct { RecordFunc func(*dal.Collection, *dal.Record) (*dal.Record, error) // contains filtered or unexported fields }
func NewWrappedIndexer ¶
func NewWrappedIndexer(indexer Indexer, parent Backend) *WrappedIndexer
func (*WrappedIndexer) DeleteQuery ¶
func (self *WrappedIndexer) DeleteQuery(collection *dal.Collection, f *filter.Filter) error
func (*WrappedIndexer) FlushIndex ¶
func (self *WrappedIndexer) FlushIndex() error
func (*WrappedIndexer) GetBackend ¶
func (self *WrappedIndexer) GetBackend() Backend
func (*WrappedIndexer) Index ¶
func (self *WrappedIndexer) Index(collection *dal.Collection, records *dal.RecordSet) error
func (*WrappedIndexer) IndexConnectionString ¶
func (self *WrappedIndexer) IndexConnectionString() *dal.ConnectionString
func (*WrappedIndexer) IndexExists ¶
func (self *WrappedIndexer) IndexExists(collection *dal.Collection, id interface{}) bool
func (*WrappedIndexer) IndexInitialize ¶
func (self *WrappedIndexer) IndexInitialize(b Backend) error
func (*WrappedIndexer) IndexRemove ¶
func (self *WrappedIndexer) IndexRemove(collection *dal.Collection, ids []interface{}) error
func (*WrappedIndexer) IndexRetrieve ¶
func (self *WrappedIndexer) IndexRetrieve(collection *dal.Collection, id interface{}) (*dal.Record, error)
func (*WrappedIndexer) ListValues ¶
func (self *WrappedIndexer) ListValues(collection *dal.Collection, fields []string, filter *filter.Filter) (map[string][]interface{}, error)
func (*WrappedIndexer) Query ¶
func (self *WrappedIndexer) Query(collection *dal.Collection, filter *filter.Filter, resultFns ...IndexResultFunc) (*dal.RecordSet, error)
func (*WrappedIndexer) QueryFunc ¶
func (self *WrappedIndexer) QueryFunc(collection *dal.Collection, filter *filter.Filter, resultFn IndexResultFunc) error
Source Files ¶
- aggregator.go
- backends.go
- bleve-indexer.go
- caching-backend.go
- dynamo-indexer.go
- dynamo.go
- elasticsearch-aggregator.go
- elasticsearch-indexer.go
- embedded-record-backend.go
- fs-indexer.go
- fs.go
- indexer-multi.go
- indexer-null.go
- indexers.go
- metaindex.go
- migratable.go
- mongo-aggregator.go
- mongo-indexer.go
- mongo.go
- options.go
- redis-indexer.go
- redis.go
- sql-aggregator.go
- sql-backend-mysql.go
- sql-backend-postgres.go
- sql-backend-sqlite.go
- sql-indexer.go
- sql.go
- wrapped-indexer.go
Click to show internal directories.
Click to hide internal directories.