Documentation ¶
Index ¶
- Constants
- Variables
- func ReadLine(reader LineReader) ([]byte, error)
- type AllowSmart
- type Cache
- type ColumnsHolder
- type Decoder
- type DecoderFn
- type Entry
- type ErrorType
- type Field
- func (f *Field) DatabaseTypeName() string
- func (f *Field) DecimalSize() (precision, scale int64, ok bool)
- func (f *Field) Init() error
- func (f *Field) Length() (length int64, ok bool)
- func (f *Field) Name() string
- func (f *Field) Nullable() (nullable, ok bool)
- func (f *Field) ScanType() reflect.Type
- func (f *Field) Tag() *io.Tag
- type Indexed
- type LineReader
- type LineWriter
- type Meta
- type ParmetrizedQuery
- type ReadCloser
- type Reader
- type Recorder
- type Refresh
- type ScanTypeHolder
- type Scanner
- type ScannerFn
- type Source
- type Stats
- type Type
- type WriteCloser
- type Writer
- type XTypesHolder
Constants ¶
View Source
const ( TypeReadMulti = "warmup" TypeReadSingle = "lazy" TypeWrite = "write" TypeNone = "none" ErrorNone = "" ErrorTypeTimeout = "aerospike timeout error" ErrorTypeServerGeneric = "aerospike error occured" ErrorTypeCurrentlyNotAvailable = "aerospike currently not available" )
Variables ¶
View Source
var Now = time.Now
Functions ¶
func ReadLine ¶
func ReadLine(reader LineReader) ([]byte, error)
Types ¶
type AllowSmart ¶
type AllowSmart bool
type Cache ¶
type Cache interface { AsSource(ctx context.Context, entry *Entry) (Source, error) AddValues(ctx context.Context, entry *Entry, values []interface{}) error Get(ctx context.Context, sql string, args []interface{}, options ...interface{}) (*Entry, error) AssignRows(entry *Entry, rows *sql.Rows) error UpdateType(ctx context.Context, entry *Entry, args []interface{}) (bool, error) Close(ctx context.Context, entry *Entry) error Delete(todo context.Context, entry *Entry) error Rollback(ctx context.Context, entry *Entry) error IndexBy(ctx context.Context, db *sql.DB, column, SQL string, args []interface{}) (int, error) }
type ColumnsHolder ¶
type ColumnsHolder struct {
// contains filtered or unexported fields
}
func NewColumnsHolder ¶
func NewColumnsHolder(entry *Entry) *ColumnsHolder
func (*ColumnsHolder) ConvertColumns ¶
func (s *ColumnsHolder) ConvertColumns() ([]io.Column, error)
type Entry ¶
type Entry struct { Meta Meta Data []byte // Entry is used as Iterator, Data is last streamed line. Id string WriteCloser *WriteCloser ReadCloser *ReadCloser Refresh bool RowAdded bool // contains filtered or unexported fields }
type Field ¶
type Field struct { ColumnName string ColumnLength int64 ColumnPrecision int64 ColumnScale int64 ColumnScanType string ColumnNullable bool ColumnDatabaseName string ColumnTag *io.Tag // contains filtered or unexported fields }
func (*Field) DatabaseTypeName ¶
func (*Field) DecimalSize ¶
type Indexed ¶
func NewIndexed ¶
func NewIndexed(columnValue interface{}) *Indexed
func (*Indexed) StringifyData ¶
type LineReader ¶
type LineWriter ¶
type LineWriter struct {
// contains filtered or unexported fields
}
func (*LineWriter) Flush ¶
func (l *LineWriter) Flush() error
type ParmetrizedQuery ¶ added in v0.2.0
type ParmetrizedQuery struct { By string SQL string Ordered bool //SQL uses order by indexby column Args []interface{} In []interface{} Offset int Limit int OnSkip func(values []interface{}) error // contains filtered or unexported fields }
ParmetrizedQuery abstraction to represent data optimisation with caching and custom pagination
func (*ParmetrizedQuery) Init ¶ added in v0.2.0
func (m *ParmetrizedQuery) Init()
func (*ParmetrizedQuery) MarshalArgs ¶ added in v0.2.0
func (m *ParmetrizedQuery) MarshalArgs() ([]byte, error)
type ReadCloser ¶
type ReadCloser struct {
// contains filtered or unexported fields
}
func NewReadCloser ¶
func NewReadCloser(reader Reader, closer io.Closer) *ReadCloser
func (*ReadCloser) Close ¶
func (w *ReadCloser) Close() error
type Reader ¶
type Reader interface { io.Reader LineReader }
type Recorder ¶
type Recorder interface { AddValues(values []interface{}) ScanValues(values []interface{}) }
type ScanTypeHolder ¶
type ScanTypeHolder struct {
// contains filtered or unexported fields
}
func (*ScanTypeHolder) InitType ¶
func (t *ScanTypeHolder) InitType(values []interface{})
func (*ScanTypeHolder) Match ¶
func (t *ScanTypeHolder) Match(entry *Entry) bool
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func NewScanner ¶
func NewScanner(typeHolder *ScanTypeHolder, recorder Recorder) *Scanner
type Stats ¶ added in v0.2.0
type WriteCloser ¶
type WriteCloser struct {
// contains filtered or unexported fields
}
func NewWriteCloser ¶
func NewWriteCloser(writer Writer, closer io.Closer) *WriteCloser
func (*WriteCloser) Close ¶
func (w *WriteCloser) Close() error
func (*WriteCloser) Flush ¶
func (w *WriteCloser) Flush() error
type Writer ¶
func NewLineWriter ¶
type XTypesHolder ¶
type XTypesHolder struct {
// contains filtered or unexported fields
}
func NewXTypeHolder ¶
func NewXTypeHolder(entry *Entry) *XTypesHolder
func (*XTypesHolder) XTypes ¶
func (s *XTypesHolder) XTypes() []*xunsafe.Type
Source Files ¶
Click to show internal directories.
Click to hide internal directories.