Golang
This is a Go client library for interacting with the TempDB server. It provides an interface to connect, store, retrieve, and manage data within a TempDB database.
Installation
To use this client in your Go project, run:
Usage
Here's an example of how to use the TempDB Go client:
Other functions
Data Storage: Use
Store
to add structured data into TempDB.Data Retrieval: Use
GetByKey
to fetch data by its key.Session Management: Includes commands for creating, fetching, modifying, and deleting sessions.
Batch Operations: Use
StoreBatch
to insert multiple entries at once, or importing a CSV or JSON file.Other Commands:
Set
: Store a key-value pair.SetEx
: Store a key-value pair with an expiry.Delete
: Remove a key from the database.LPush
: Push a value onto a list.SAdd
: Add a value to a set.GetFieldByKey
: Retrieve specific fields within a key.ViewData
: View all data in the database.
Example for Data Retrieval
Session Management Example
Refer to the library source code for further details on all available commands and their usage.
Last updated