Documentation ¶
Index ¶
- type Conn
- func (c *Conn) Begin() *Transaction
- func (c *Conn) Close() error
- func (c *Conn) Del(ctx context.Context, key string) error
- func (c *Conn) Get(ctx context.Context, key string) ([]byte, error)
- func (c *Conn) Ping(ctx context.Context) error
- func (c *Conn) Save(ctx context.Context, key string, value []byte) error
- type Transaction
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
func NewScdbConn ¶
Creates a connection to the scdb. address format host:port example 127.0.0.1:50051
func (*Conn) Begin ¶
func (c *Conn) Begin() *Transaction
Begin SCDB transaction, return nil is begin error
func (*Conn) Del ¶
Deletes data based on the key. If successful, it returns nil, and if it fails, it returns an error.
func (*Conn) Get ¶
Based on the key, it retrieves the value. If the retrieval fails, it returns an error, and if successful, it returns the value associated with the key.
type Transaction ¶
type Transaction struct {
// contains filtered or unexported fields
}
func (*Transaction) Del ¶
func (t *Transaction) Del(ctx context.Context, key string) error
Deletes data based on the key. If successful, it returns nil, and if it fails, it returns an error.
Click to show internal directories.
Click to hide internal directories.