Documentation ¶
Index ¶
- Constants
- type CId
- type CIdSet
- type Collection
- type FieldConf
- type FieldType
- type FielderConf
- type FilterArgument
- type FullmatchIndexConf
- type IndexerConf
- type PrefixIndexConf
- type QueryAndConf
- type QueryAtomConf
- type QueryConf
- type QueryContextConf
- type QueryImplicationConf
- type QueryNegConf
- type QueryOrConf
- type QueryRange
- type QuerySpatialConf
- type RamCollection
- func (ego *RamCollection) AddRecord(rc RecordConf) (CId, error)
- func (ego *RamCollection) Commit() error
- func (ego *RamCollection) DeinterpretField(val any, nth int) (FielderConf, error)
- func (ego *RamCollection) DeinterpretRecord(r []any) (RecordConf, error)
- func (ego *RamCollection) DeleteByFilter(fa FilterArgument) error
- func (ego *RamCollection) DeleteRecord(rc RecordConf) error
- func (ego *RamCollection) EditRecord(rc RecordConf) error
- func (ego *RamCollection) Filter(fa FilterArgument) (stream.Producer[RecordConf], error)
- func (ego *RamCollection) Inspect()
- func (ego *RamCollection) InterpretField(fc FielderConf) (any, error)
- func (ego *RamCollection) InterpretRecord(rc RecordConf) ([]any, error)
- func (ego *RamCollection) Rows() map[CId][]any
- func (ego *RamCollection) Serialize() gonatus.Conf
- type RamCollectionConf
- type RecordConf
- type SchemaConf
- type SpatialIndexerConf
Constants ¶
const ( ASC = iota DESC )
const MaxInt = int(MaxUint >> 1)
const MaxUint = ^uint64(0)
const MinInt = -MaxInt - 1
const MinUint = 0
const NO_LIMIT = -1
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CIdSet ¶
func CIdSetFromSlice ¶
Creates a CId set from the CId slice.
Parameters:
- s - CId slice.
Returns:
- New CId set.
func (CIdSet) Intersect ¶
Makes the intersection of two CId sets.
Parameters:
- s - One of the CId sets.
Returns:
- Newly created CId set by intersection.
type Collection ¶
type Collection interface { gonatus.Gobjecter Filter(FilterArgument) (stream.Producer[RecordConf], error) // Group(QueryConf, GroupQueryConf) (streams.ReadableOutputStreamer[GroupRecordConf], error) // TODO: define grouping AddRecord(RecordConf) (CId, error) DeleteRecord(RecordConf) error DeleteByFilter(FilterArgument) error EditRecord(RecordConf) error Commit() error }
type FieldConf ¶
type FieldConf[T any] struct { FielderConf Value T }
type FielderConf ¶
type FielderConf interface { }
type FilterArgument ¶
type FullmatchIndexConf ¶
type FullmatchIndexConf[T any] struct { IndexerConf Name string }
type PrefixIndexConf ¶
type PrefixIndexConf[T any] struct { IndexerConf Name string MinPrefix uint }
type QueryAndConf ¶
type QueryAndConf struct {
QueryContextConf
}
type QueryAtomConf ¶
type QueryAtomConf struct { QueryConf MatchType IndexerConf Name string Value any // TODO: Use generic here? }
type QueryContextConf ¶
type QueryImplicationConf ¶
type QueryImplicationConf struct { QueryConf Left QueryAtomConf Right QueryAtomConf }
type QueryNegConf ¶
type QueryNegConf struct {
QueryAtomConf
}
type QueryOrConf ¶
type QueryOrConf struct {
QueryContextConf
}
type QueryRange ¶
type QueryRange[T any] struct { QuerySpatialConf Lower T Higher T }
type QuerySpatialConf ¶
type QuerySpatialConf interface { QueryConf }
type RamCollection ¶
func NewRamCollection ¶
func NewRamCollection(rc RamCollectionConf) *RamCollection
Creates new RamCollection.
Parameters:
- rc - RamCollection Conf.
Returns:
- pointer to a new instance of RamCollection.
func (*RamCollection) AddRecord ¶
func (ego *RamCollection) AddRecord(rc RecordConf) (CId, error)
Adds to the RamCollection the record whose configuration is passed by the parameter, and adds it to the lookup indexes.
Parameters:
- rc - Configuration of the Record.
Returns:
- CId of newly added record,
- error, if any.
func (*RamCollection) DeinterpretField ¶
func (ego *RamCollection) DeinterpretField(val any, nth int) (FielderConf, error)
Deinterprets the Field on the given index.
Parameters:
- val - value of FieldConf,
- nth - index of column.
Returns:
- FielderConf,
- error, if any.
func (*RamCollection) DeinterpretRecord ¶
func (ego *RamCollection) DeinterpretRecord(r []any) (RecordConf, error)
Deinterprets the values of the row passed in the parameter.
Parameters:
- r - Values of row.
Returns:
- Configuration of Record,
- error, if any.
func (*RamCollection) DeleteByFilter ¶
func (ego *RamCollection) DeleteByFilter(fa FilterArgument) error
Filters the matching rows according to the given query. It then deletes them from the RamCollection and deletes them from the search indexers.
Parameters:
- q - Configuration of the query.
Returns:
- Error, if any.
func (*RamCollection) DeleteRecord ¶
func (ego *RamCollection) DeleteRecord(rc RecordConf) error
Deletes from the RamCollection the record whose configuration is passed by the parameter, and deletes it from lookup indexes.
Parameters:
- rc - Configuration of the Record.
Returns:
- Error, if any.
func (*RamCollection) EditRecord ¶
func (ego *RamCollection) EditRecord(rc RecordConf) error
Edits the RamCollection record whose configuration is passed by the parameter and modifies it in the lookup indexes.
Parameters:
- rc - Configuration of Record.
Returns:
- Error, if any.
func (*RamCollection) Filter ¶
func (ego *RamCollection) Filter(fa FilterArgument) (stream.Producer[RecordConf], error)
Filters rows based on the type and content of the query and writes them to the stream.
Parameters:
- fa - Filter argument.
Returns:
- Readable Output Streamer,
- error, if any.
func (*RamCollection) Inspect ¶
func (ego *RamCollection) Inspect()
func (*RamCollection) InterpretField ¶
func (ego *RamCollection) InterpretField(fc FielderConf) (any, error)
Interprets the Field passed in the parameter.
Parameters:
- fc - FielderConf.
Returns:
- Value of FieldConf,
- error, if any.
func (*RamCollection) InterpretRecord ¶
func (ego *RamCollection) InterpretRecord(rc RecordConf) ([]any, error)
Interprets the Record passed in the parameter.
Parameters:
- rc - Configuration of Record.
Returns:
- Slice of values from a row,
- error, if any.
func (*RamCollection) Rows ¶
func (ego *RamCollection) Rows() map[CId][]any
Returns:
- RamCollection's rows
func (*RamCollection) Serialize ¶
func (ego *RamCollection) Serialize() gonatus.Conf
Serializes RamCollection.
Returns:
- configuration of the Gobject.
type RamCollectionConf ¶
type RamCollectionConf struct { SchemaConf MaxMemory uint64 }
RAM COLLECTION IMPL
type RecordConf ¶
type RecordConf struct { Id CId Cols []FielderConf }
type SchemaConf ¶
type SchemaConf struct { Name string FieldsNaming []string Fields []FielderConf Indexes [][]IndexerConf }
type SpatialIndexerConf ¶
type SpatialIndexerConf interface { }