Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dcsunset/mysql-kv-wrapper
A wrapper for KV operation in MySQL
https://github.com/dcsunset/mysql-kv-wrapper
Last synced: 3 days ago
JSON representation
A wrapper for KV operation in MySQL
- Host: GitHub
- URL: https://github.com/dcsunset/mysql-kv-wrapper
- Owner: DCsunset
- Created: 2021-09-26T16:58:41.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2021-09-29T23:59:30.000Z (over 3 years ago)
- Last Synced: 2024-11-08T08:55:01.238Z (about 2 months ago)
- Language: Go
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# mysql-kv-wrapper
## Installation
```
go get github.com/DCsunset/mysql-kv-wrapper
```## Examples
```go
package mainimport (
kvstore "github.com/DCsunset/mysql-kv-wrapper"
)func main() {
var store kvstore.KVStore
err := store.Open("root:password@/")
if err != nil {
panic(err)
}
defer store.Close()err = store.Write("hello", "world")
if err != nil {
panic(err)
}
value, err := store.Read("hello")
if value != "world" {
panic("Wrong value")
}
}
```