sugar

package
v3.44.0-rc3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 4, 2023 License: Apache-2.0 Imports: 17 Imported by: 19

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DSN added in v3.21.0

func DSN(endpoint, database string, secure bool) (s string)

DSN makes connection string (data source name) by endpoint, database and secure

func GenerateDeclareSection deprecated added in v3.28.0

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 helper

func IsDirectoryExists added in v3.42.7

func IsDirectoryExists(ctx context.Context, c scheme.Client, absTablePath string) (exists bool, _ error)

func IsTableExists added in v3.40.0

func IsTableExists(ctx context.Context, c scheme.Client, absTablePath string) (exists bool, _ error)

func LoadCertificatesFromFile added in v3.23.0

func LoadCertificatesFromFile(caFile string) ([]*x509.Certificate, error)

LoadCertificatesFromFile read and parse caFile and returns certificates

func LoadCertificatesFromPem added in v3.23.0

func LoadCertificatesFromPem(bytes []byte) (certs []*x509.Certificate)

LoadCertificatesFromPem parse bytes and returns certificates

func MakeRecursive added in v3.5.2

func MakeRecursive(ctx context.Context, db dbForMakeRecursive, pathToCreate string) error

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 added in v3.5.2

func RemoveRecursive(ctx context.Context, db dbFoRemoveRecursive, pathToRemove string) error

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 ToYdbParam deprecated added in v3.38.0

func ToYdbParam(param sql.NamedArg) (table.ParameterOption, error)

ToYdbParam converts

Deprecated: use testutil/QueryBind helper

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL