This website collects cookies to deliver better user experience
mysql> DESCRIBE celebrity; +-------+------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +-------+------+------+-----+---------+-------+ | name | text | YES | | NULL | | | age | int | YES | | NULL | | +-------+------+------+-----+---------+-------+ 2 rows in set (0.01 sec)
package main import ( "github.com/DGKSK8LIFE/redisql" ) func main() { config := redisql.Config{ SQLType: "mysql", SQLUser: "user", SQLPassword: "password", SQLDatabase: "celebrities", SQLHost: "localhost", SQLPort: "3306", SQLTable: "celebrity", RedisAddr: "localhost:6379", RedisPass: "password", } err := config.CopyToString() if err != nil { panic(err) } }
127.0.0.1:6379> get celebrity:0:name "Jaden Smith"
// copy to redis list config.CopyToList() // copy to redis hash config.CopyToHash()
48
0