File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed
Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -273,11 +273,12 @@ import (
273273)
274274
275275func main () {
276- // Open the data.db file. It will be created if it doesn't exist .
276+ // Open or create the data.db file.
277277 db , err := redka.Open (" data.db" )
278278 if err != nil {
279279 log.Fatal (err)
280280 }
281+ // Always close the database when you are finished.
281282 defer db.Close ()
282283 // ...
283284}
@@ -347,10 +348,11 @@ rkey
347348---
348349id integer primary key
349350key text not null
350- type integer not null
351- version integer not null
352- etime integer
353- mtime integer not null
351+ type integer not null -- 1 string, 2 list, 3 set, 4 hash
352+ -- 5 sorted set
353+ version integer not null -- incremented when the key value is updated
354+ etime integer -- expiration timestamp in unix milliseconds
355+ mtime integer not null -- modification timestamp in unix milliseconds
354356
355357rstring
356358---
@@ -373,7 +375,7 @@ select * from vstring;
373375└────────┴──────┴───────┴────────┴───────┴─────────────────────┘
374376```
375377
376- Type in views is the Redis data type. Times are in UTC.
378+ ` type ` in views is the Redis data type. ` etime ` and ` mtime ` are in UTC.
377379
378380## Performance
379381
You can’t perform that action at this time.
0 commit comments