Documentation ¶
Index ¶
- func Columns(s *Scanner, it func(name string, typ internal.T))
- func Reset(s *Scanner, set *Ydb.ResultSet)
- type Scanner
- func (s *Scanner) Any() interface{}
- func (s *Scanner) AssertType(t ydb.Type) bool
- func (s *Scanner) Bool() (v bool)
- func (s *Scanner) ColumnCount() int
- func (s *Scanner) Date() (v uint32)
- func (s *Scanner) Datetime() (v uint32)
- func (s *Scanner) Decimal(t ydb.Type) (v [16]byte)
- func (s *Scanner) DictIn() (size int)
- func (s *Scanner) DictKey(i int)
- func (s *Scanner) DictOut()
- func (s *Scanner) DictPayload(i int)
- func (s *Scanner) Double() (v float64)
- func (s *Scanner) DyNumber() (v string)
- func (s *Scanner) Err() error
- func (s *Scanner) Float() (v float32)
- func (s *Scanner) HasItems() bool
- func (s *Scanner) HasNextItem() bool
- func (s *Scanner) HasNextRow() bool
- func (s *Scanner) Int16() (v int16)
- func (s *Scanner) Int32() (v int32)
- func (s *Scanner) Int64() (v int64)
- func (s *Scanner) Int8() (v int8)
- func (s *Scanner) Interval() (v int64)
- func (s *Scanner) IsDecimal() bool
- func (s *Scanner) IsNull() bool
- func (s *Scanner) IsOptional() bool
- func (s *Scanner) ItemCount() int
- func (s *Scanner) JSON() (v string)
- func (s *Scanner) JSONDocument() (v string)
- func (s *Scanner) ListIn() (size int)
- func (s *Scanner) ListItem(i int)
- func (s *Scanner) ListOut()
- func (s *Scanner) NextItem() (ok bool)
- func (s *Scanner) NextRow() bool
- func (s *Scanner) Null()
- func (s *Scanner) OBool() (v bool)
- func (s *Scanner) ODate() (v uint32)
- func (s *Scanner) ODatetime() (v uint32)
- func (s *Scanner) ODecimal(t ydb.Type) (v [16]byte)
- func (s *Scanner) ODouble() (v float64)
- func (s *Scanner) ODyNumber() (v string)
- func (s *Scanner) OFloat() (v float32)
- func (s *Scanner) OInt16() (v int16)
- func (s *Scanner) OInt32() (v int32)
- func (s *Scanner) OInt64() (v int64)
- func (s *Scanner) OInt8() (v int8)
- func (s *Scanner) OInterval() (v int64)
- func (s *Scanner) OJSON() (v string)
- func (s *Scanner) OJSONDocument() (v string)
- func (s *Scanner) OString() (v []byte)
- func (s *Scanner) OTimestamp() (v uint64)
- func (s *Scanner) OTzDate() (v string)
- func (s *Scanner) OTzDatetime() (v string)
- func (s *Scanner) OTzTimestamp() (v string)
- func (s *Scanner) OUTF8() (v string)
- func (s *Scanner) OUUID() (v [16]byte)
- func (s *Scanner) OUint16() (v uint16)
- func (s *Scanner) OUint32() (v uint32)
- func (s *Scanner) OUint64() (v uint64)
- func (s *Scanner) OUint8() (v uint8)
- func (s *Scanner) OYSON() (v string)
- func (s *Scanner) Path() string
- func (s *Scanner) ResultSetTruncated() bool
- func (s *Scanner) RowCount() int
- func (s *Scanner) SeekItem(name string) bool
- func (s *Scanner) String() (v []byte)
- func (s *Scanner) StructField(i int) (name string)
- func (s *Scanner) StructIn() (size int)
- func (s *Scanner) StructOut()
- func (s *Scanner) Timestamp() (v uint64)
- func (s *Scanner) TupleIn() (size int)
- func (s *Scanner) TupleItem(i int)
- func (s *Scanner) TupleOut()
- func (s *Scanner) Type() ydb.Type
- func (s *Scanner) TzDate() (v string)
- func (s *Scanner) TzDatetime() (v string)
- func (s *Scanner) TzTimestamp() (v string)
- func (s *Scanner) UTF8() (v string)
- func (s *Scanner) UUID() (v [16]byte)
- func (s *Scanner) Uint16() (v uint16)
- func (s *Scanner) Uint32() (v uint32)
- func (s *Scanner) Uint64() (v uint64)
- func (s *Scanner) Uint8() (v uint8)
- func (s *Scanner) Unwrap()
- func (s *Scanner) UnwrapDecimal() (v [16]byte, precision, scale uint32)
- func (s *Scanner) Value() ydb.Value
- func (s *Scanner) Variant() (name string, index uint32)
- func (s *Scanner) WritePathTo(w io.Writer) (n int64, err error)
- func (s *Scanner) YSON() (v string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Scanner ¶
type Scanner struct {
// contains filtered or unexported fields
}
func (*Scanner) Any ¶
func (s *Scanner) Any() interface{}
Any returns any pritmitive value. Currently it may return one of this types:
bool int8 uint8 int16 uint16 int32 uint32 int64 uint64 float32 float64 []byte string [16]byte
Or untyped nil.
func (*Scanner) AssertType ¶
func (*Scanner) ColumnCount ¶
ColumnCount returns number of columns in the current result set.
func (*Scanner) Decimal ¶
Decimal returns decimal value represented by big-endian 128 bit signed integes.
func (*Scanner) DictIn ¶
DictIn interprets current item under scan as a ydb's dict. It returns the size of the nested items pairs. If there is no current item under scan it returns -1.
func (*Scanner) DictKey ¶
DictKey selects current item i-th pair key as an item to scan. Note that DictIn() must be called before. It panics if i is out of bounds.
func (*Scanner) DictOut ¶
func (s *Scanner) DictOut()
DictOut leaves dict entered before by DictIn() call.
func (*Scanner) DictPayload ¶
DictPayload selects current item i-th pair value as an item to scan. Note that DictIn() must be called before. It panics if i is out of bounds.
func (*Scanner) HasNextItem ¶
func (*Scanner) HasNextRow ¶
HasNextRow reports whether result row may be advanced.
It may be useful to call HasNextRow() instead of NextRow() to look ahead without advancing the result rows.
func (*Scanner) IsOptional ¶
func (*Scanner) JSONDocument ¶
func (*Scanner) ListIn ¶
ListIn interprets current item under scan as a ydb's list. It returns the size of the nested items. If current item under scan is not a list type, it returns -1.
func (*Scanner) ListItem ¶
ListItem selects current item i-th element as an item to scan. ListIn() must be called before.
func (*Scanner) ListOut ¶
func (s *Scanner) ListOut()
ListOut leaves list entered before by ListIn() call.
func (*Scanner) NextItem ¶
NextItem selects next item to parse in the current row. It returns false if there are no more items in the row.
Note that NextItem() differs from NextRow() and NextSet() – if it return false it fails the Result such that no further operations may be processed. That is, res.Err() becomes non-nil.
func (*Scanner) NextRow ¶
NextRow selects next row in the current result set. It returns false if there are no more rows in the result set.
func (*Scanner) OJSONDocument ¶
func (*Scanner) OTimestamp ¶
func (*Scanner) OTzDatetime ¶
func (*Scanner) OTzTimestamp ¶
func (*Scanner) ResultSetTruncated ¶
ResultSetTruncated returns true if current result set has been truncated by server
func (*Scanner) SeekItem ¶
SeekItem finds the column with given name in the result set and selects appropriate item to parse in the current row.
func (*Scanner) StructField ¶
StructField selects current item i-th field value as an item to scan. Note that StructIn() must be called before. It panics if i is out of bounds.
func (*Scanner) StructIn ¶
StructIn interprets current item under scan as a ydb's struct. It returns the size of the nested items – the struct fields values. If there is no current item under scan it returns -1.
func (*Scanner) StructOut ¶
func (s *Scanner) StructOut()
StructOut leaves struct entered before by StructIn() call.
func (*Scanner) TupleIn ¶
TupleIn interprets current item under scan as a ydb's tuple. It returns the size of the nested items.
func (*Scanner) TupleItem ¶
TupleItem selects current item i-th element as an item to scan. Note that TupleIn() must be called before. It panics if i is out of bounds.
func (*Scanner) TupleOut ¶
func (s *Scanner) TupleOut()
TupleOut leaves tuple entered before by TupleIn() call.
func (*Scanner) TzDatetime ¶
func (*Scanner) TzTimestamp ¶
func (*Scanner) Unwrap ¶
func (s *Scanner) Unwrap()
Unwrap unwraps current item under scan interpreting it as Optional<T> type.
func (*Scanner) UnwrapDecimal ¶
UnwrapDecimal returns decimal value represented by big-endian 128 bit signed integer and its type information.
func (*Scanner) Value ¶
func (s *Scanner) Value() ydb.Value
Value returns current item under scan as ydb.Value type.