Documentation ¶
Index ¶
- Constants
- func IsTransportError(err error, codes ...grpc_codes.Code) bool
- func List(t Type) ydb_types.Type
- func Optional(t ydb_types.Type) ydb_types.Type
- func OptionalWithDefault(columnName string, destinationValueReference interface{}) ydb_named.Value
- func ReadColumn(name string) ydb_options.ReadTableOption
- func ReadGreaterOrEqual(v Value) ydb_options.ReadTableOption
- func ReadLessOrEqual(v Value) ydb_options.ReadTableOption
- func ReadOrdered() ydb_options.ReadTableOption
- func StructFieldValue(name string, v Value) ydb_types.StructValueOption
- func ValueParam(name string, v Value) ydb_table.ParameterOption
- func WithCredentials(creds ydb_credentials.Credentials) option
- func WithDetails(details trace.Details) option
- func WithRegistry(registry metrics.Registry) option
- func WithTraceDetails(details ydb_trace.Details) metricsOption
- func WithTraces(registry metrics.Registry, opts ...metricsOption) ydb.Option
- type CreateTableDescription
- type CreateTableOption
- func WithColumn(name string, typ Type) CreateTableOption
- func WithColumnAndFamily(name string, typ Type, family string) CreateTableOption
- func WithColumnFamilies(cf ...ydb_options.ColumnFamily) CreateTableOption
- func WithExternalBlobs(mediaKind string) CreateTableOption
- func WithPrimaryKeyColumn(columns ...string) CreateTableOption
- func WithSecondaryKeyColumn(columns ...string) CreateTableOption
- func WithUniformPartitions(n uint64) CreateTableOption
- type RawValue
- type Result
- func (r *Result) Close() error
- func (r *Result) Err() error
- func (r *Result) NextResultSet(ctx context.Context, columns ...string) bool
- func (r *Result) NextRow() bool
- func (r *Result) Scan(values ...ydb_indexed.RequiredOrOptional) error
- func (r *Result) ScanNamed(namedValues ...ydb_named.Value) error
- func (r *Result) ScanWithDefaults(values ...ydb_indexed.Required) error
- type S3Client
- func (c *S3Client) CreateBucket(ctx context.Context, bucket string) (err error)
- func (c *S3Client) DeleteObject(ctx context.Context, bucket string, key string) (err error)
- func (c *S3Client) GetObject(ctx context.Context, bucket string, key string) (o S3Object, err error)
- func (c *S3Client) PutObject(ctx context.Context, bucket string, key string, object S3Object) (err error)
- type S3Credentials
- type S3Object
- type Session
- func (s *Session) BeginRWTransaction(ctx context.Context) (tx *Transaction, err error)
- func (s *Session) ExecuteRO(ctx context.Context, query string, params ...ydb_table.ParameterOption) (Result, error)
- func (s *Session) ExecuteRW(ctx context.Context, query string, params ...ydb_table.ParameterOption) (Result, error)
- func (s *Session) StreamExecuteRO(ctx context.Context, query string, params ...ydb_table.ParameterOption) (Result, error)
- func (s *Session) StreamReadTable(ctx context.Context, path string, opts ...ydb_options.ReadTableOption) (Result, error)
- type Transaction
- type Type
- type Value
- func BoolValue(v bool) Value
- func BytesValue(v []byte) Value
- func DatetimeValueFromTime(t time.Time) Value
- func DoubleValue(v float64) Value
- func FloatValue(v float32) Value
- func Int32Value(v int32) Value
- func Int64Value(v int64) Value
- func ListValue(items ...Value) Value
- func OptionalValue(v Value) Value
- func StringValue(v []byte) Value
- func StructValue(opts ...ydb_types.StructValueOption) Value
- func TimestampValue(t time.Time) Value
- func TupleValue(values ...Value) Value
- func UTF8Value(v string) Value
- func Uint32Value(v uint32) Value
- func Uint64Value(v uint64) Value
- func ZeroValue(t Type) Value
- type YDBClient
- func (c *YDBClient) AbsolutePath(elem ...string) string
- func (c *YDBClient) Close(ctx context.Context) error
- func (c *YDBClient) CreateOrAlterTable(ctx context.Context, folder string, name string, ...) error
- func (c *YDBClient) DropTable(ctx context.Context, folder string, name string) error
- func (c *YDBClient) Execute(ctx context.Context, op func(context.Context, *Session) error) error
- func (c *YDBClient) ExecuteRO(ctx context.Context, query string, params ...ydb_table.ParameterOption) (Result, error)
- func (c *YDBClient) ExecuteRW(ctx context.Context, query string, params ...ydb_table.ParameterOption) (Result, error)
Constants ¶
View Source
const ( TypeBool = ydb_types.TypeBool TypeInt32 = ydb_types.TypeInt32 TypeUint32 = ydb_types.TypeUint32 TypeInt64 = ydb_types.TypeInt64 TypeUint64 = ydb_types.TypeUint64 TypeTimestamp = ydb_types.TypeTimestamp TypeString = ydb_types.TypeString TypeBytes = ydb_types.TypeBytes TypeUTF8 = ydb_types.TypeText )
Variables ¶
This section is empty.
Functions ¶
func IsTransportError ¶
func IsTransportError(err error, codes ...grpc_codes.Code) bool
func OptionalWithDefault ¶
func ReadColumn ¶
func ReadColumn(name string) ydb_options.ReadTableOption
func ReadGreaterOrEqual ¶
func ReadGreaterOrEqual(v Value) ydb_options.ReadTableOption
func ReadLessOrEqual ¶
func ReadLessOrEqual(v Value) ydb_options.ReadTableOption
func ReadOrdered ¶
func ReadOrdered() ydb_options.ReadTableOption
func StructFieldValue ¶
func StructFieldValue(name string, v Value) ydb_types.StructValueOption
func ValueParam ¶
func ValueParam(name string, v Value) ydb_table.ParameterOption
func WithCredentials ¶
func WithCredentials(creds ydb_credentials.Credentials) option
func WithDetails ¶
func WithRegistry ¶
func WithTraceDetails ¶
func WithTraces ¶
Types ¶
type CreateTableDescription ¶
type CreateTableDescription struct { Columns []ydb_options.Column PrimaryKey []string SecondaryKeys []string ColumnFamilies []ydb_options.ColumnFamily UniformPartitions uint64 ExternalBlobsMediaKind string }
func NewCreateTableDescription ¶
func NewCreateTableDescription(opts ...CreateTableOption) CreateTableDescription
type CreateTableOption ¶
type CreateTableOption func(*CreateTableDescription)
func WithColumn ¶
func WithColumn(name string, typ Type) CreateTableOption
func WithColumnAndFamily ¶
func WithColumnAndFamily(name string, typ Type, family string) CreateTableOption
func WithColumnFamilies ¶
func WithColumnFamilies(cf ...ydb_options.ColumnFamily) CreateTableOption
func WithExternalBlobs ¶
func WithExternalBlobs(mediaKind string) CreateTableOption
func WithPrimaryKeyColumn ¶
func WithPrimaryKeyColumn(columns ...string) CreateTableOption
func WithSecondaryKeyColumn ¶
func WithSecondaryKeyColumn(columns ...string) CreateTableOption
func WithUniformPartitions ¶
func WithUniformPartitions(n uint64) CreateTableOption
type Result ¶
type Result struct {
// contains filtered or unexported fields
}
func (*Result) NextResultSet ¶
func (*Result) Scan ¶
func (r *Result) Scan(values ...ydb_indexed.RequiredOrOptional) error
func (*Result) ScanWithDefaults ¶
func (r *Result) ScanWithDefaults(values ...ydb_indexed.Required) error
type S3Client ¶
type S3Client struct {
// contains filtered or unexported fields
}
func NewS3Client ¶
func NewS3ClientFromConfig ¶
func (*S3Client) CreateBucket ¶
func (*S3Client) DeleteObject ¶
type S3Credentials ¶
type S3Credentials struct { ID string `json:"id,omitempty"` Secret string `json:"secret,omitempty"` }
func NewS3Credentials ¶
func NewS3Credentials(id, secret string) S3Credentials
func NewS3CredentialsFromFile ¶
func NewS3CredentialsFromFile(filePath string) (S3Credentials, error)
type Session ¶
type Session struct {
// contains filtered or unexported fields
}
func (*Session) BeginRWTransaction ¶
func (s *Session) BeginRWTransaction( ctx context.Context, ) (tx *Transaction, err error)
func (*Session) StreamExecuteRO ¶
func (*Session) StreamReadTable ¶
func (s *Session) StreamReadTable( ctx context.Context, path string, opts ...ydb_options.ReadTableOption, ) (Result, error)
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Execute ¶
func (t *Transaction) Execute( ctx context.Context, query string, params ...ydb_table.ParameterOption, ) (res Result, err error)
type Value ¶
func BytesValue ¶
func DatetimeValueFromTime ¶
func DoubleValue ¶
func FloatValue ¶
func Int32Value ¶
func Int64Value ¶
func OptionalValue ¶
func StringValue ¶
func StructValue ¶
func StructValue(opts ...ydb_types.StructValueOption) Value
func TimestampValue ¶
func TupleValue ¶
func Uint32Value ¶
func Uint64Value ¶
type YDBClient ¶
type YDBClient struct {
// contains filtered or unexported fields
}
func NewYDBClient ¶
func NewYDBClient( ctx context.Context, config *persistence_config.PersistenceConfig, registry metrics.Registry, opts ...option, ) (*YDBClient, error)
func (*YDBClient) AbsolutePath ¶
func (*YDBClient) CreateOrAlterTable ¶
Click to show internal directories.
Click to hide internal directories.