()
| 36 | } |
| 37 | |
| 38 | func main() { |
| 39 | // create bucket first |
| 40 | createBucket() |
| 41 | |
| 42 | // insert |
| 43 | put() |
| 44 | // read |
| 45 | read() |
| 46 | |
| 47 | // delete |
| 48 | delete() |
| 49 | // read |
| 50 | read() |
| 51 | |
| 52 | // insert |
| 53 | put() |
| 54 | // read |
| 55 | read() |
| 56 | |
| 57 | // update |
| 58 | put2() |
| 59 | // read |
| 60 | read() |
| 61 | |
| 62 | // get value length |
| 63 | valueLen() |
| 64 | |
| 65 | // get new value and old value |
| 66 | getSet() |
| 67 | // read |
| 68 | read() |
| 69 | |
| 70 | //put if not exists |
| 71 | put3() |
| 72 | |
| 73 | //put if exits |
| 74 | put4() |
| 75 | |
| 76 | // get remaining TTL |
| 77 | getTTL() |
| 78 | |
| 79 | // save name2 as persistent |
| 80 | persist() |
| 81 | |
| 82 | // get uncommitted update in same transaction |
| 83 | getUncommittedUpdateInSameTransaction() |
| 84 | } |
| 85 | |
| 86 | func createBucket() { |
| 87 | if err := db.Update( |
nothing calls this directly
no test coverage detected