package sugar
import "github.com/ydb-platform/ydb-go-sdk/v3/sugar"
Index ¶
- func DSN(endpoint, database string, secure bool) (s string)
- func GenerateDeclareSection[T *table.QueryParameters | []table.ParameterOption | []sql.NamedArg]( params T, ) (string, error)
- func IsColumnTableExists(ctx context.Context, c scheme.Client, absTablePath string) (exists bool, _ error)
- func IsDirectoryExists(ctx context.Context, c scheme.Client, absTablePath string) (exists bool, _ error)
- func IsEntryExists(ctx context.Context, c scheme.Client, absPath string, entryTypes ...scheme.EntryType) ( exists bool, _ error, )
- func IsTableExists(ctx context.Context, c scheme.Client, absTablePath string) (exists bool, _ error)
- func LoadCertificatesFromFile(caFile string) ([]*x509.Certificate, error)
- func LoadCertificatesFromPem(bytes []byte) (certs []*x509.Certificate)
- func MakeRecursive(ctx context.Context, db dbForMakeRecursive, pathToCreate string) error
- func RemoveRecursive(ctx context.Context, db dbFoRemoveRecursive, pathToRemove string) error
- func StackRecord(depth int) string
- func ToYdbParam(param sql.NamedArg) (table.ParameterOption, error)
Functions ¶
func DSN ¶
DSN makes connection string (data source name) by endpoint, database and secure
func GenerateDeclareSection ¶
func GenerateDeclareSection[T *table.QueryParameters | []table.ParameterOption | []sql.NamedArg]( params T, ) (string, error)
GenerateDeclareSection generates DECLARE section text in YQL query by params
Deprecated: use testutil.QueryBind(ydb.WithAutoDeclare()) helper
func IsColumnTableExists ¶
func IsColumnTableExists(ctx context.Context, c scheme.Client, absTablePath string) (exists bool, _ error)
func IsDirectoryExists ¶
func IsDirectoryExists(ctx context.Context, c scheme.Client, absTablePath string) (exists bool, _ error)
func IsEntryExists ¶
func IsEntryExists(ctx context.Context, c scheme.Client, absPath string, entryTypes ...scheme.EntryType) ( exists bool, _ error, )
func IsTableExists ¶
func IsTableExists(ctx context.Context, c scheme.Client, absTablePath string) (exists bool, _ error)
func LoadCertificatesFromFile ¶
func LoadCertificatesFromFile(caFile string) ([]*x509.Certificate, error)
LoadCertificatesFromFile read and parse caFile and returns certificates
func LoadCertificatesFromPem ¶
func LoadCertificatesFromPem(bytes []byte) (certs []*x509.Certificate)
LoadCertificatesFromPem parse bytes and returns certificates
func MakeRecursive ¶
MakeRecursive creates path inside database pathToCreate is a database root relative path MakeRecursive method equal bash command `mkdir -p ~/path/to/create` where `~` - is a root of database
func RemoveRecursive ¶
RemoveRecursive remove selected directory or table names in database. pathToRemove is a database root relative path All database entities in prefix path will remove if names list is empty. Empty prefix means than use root of database. RemoveRecursive method equal bash command `rm -rf ~/path/to/remove` where `~` - is a root of database
func StackRecord ¶
func ToYdbParam ¶
func ToYdbParam(param sql.NamedArg) (table.ParameterOption, error)
ToYdbParam converts
Deprecated: use testutil/QueryBind helper
Source Files ¶
certificates.go check_exists.go dsn.go params_go1.18.go path.go stack.go
- Version
- v3.50.0
- Published
- Aug 21, 2023
- Platform
- darwin/amd64
- Imports
- 18 packages
- Last checked
- 3 seconds ago –
Tools for package owners.