| 1 |
Execution example:: |
| 2 |
|
| 3 |
table_create Country TABLE_HASH_KEY ShortText |
| 4 |
# [[0,1337566253.89858,0.000355720520019531],true] |
| 5 |
table_create Users TABLE_HASH_KEY UInt32 |
| 6 |
# [[0,1337566253.89858,0.000355720520019531],true] |
| 7 |
column_create Users name COLUMN_SCALAR ShortText |
| 8 |
# [[0,1337566253.89858,0.000355720520019531],true] |
| 9 |
column_create Users country COLUMN_SCALAR Country |
| 10 |
# [[0,1337566253.89858,0.000355720520019531],true] |
| 11 |
load --table Users |
| 12 |
[ |
| 13 |
{"_key": 1, "name": "John", country: "United States"} |
| 14 |
{"_key": 2, "name": "Mike", country: "United States"} |
| 15 |
{"_key": 3, "name": "Takashi", country: "Japan"} |
| 16 |
{"_key": 4, "name": "Hanako", country: "Japan"} |
| 17 |
] |
| 18 |
# [[0,1337566253.89858,0.000355720520019531],4] |
| 19 |
load --table Country |
| 20 |
[ |
| 21 |
{"_key": "United States"} |
| 22 |
{"_key": "Japan"} |
| 23 |
] |
| 24 |
# [[0,1337566253.89858,0.000355720520019531],2] |
| 25 |
delete Country "United States" |
| 26 |
# [[0,1337566253.89858,0.000355720520019531],true] |
| 27 |
select Country |
| 28 |
# [ |
| 29 |
# [ |
| 30 |
# 0, |
| 31 |
# 1337566253.89858, |
| 32 |
# 0.000355720520019531 |
| 33 |
# ], |
| 34 |
# [ |
| 35 |
# [ |
| 36 |
# [ |
| 37 |
# 1 |
| 38 |
# ], |
| 39 |
# [ |
| 40 |
# [ |
| 41 |
# "_id", |
| 42 |
# "UInt32" |
| 43 |
# ], |
| 44 |
# [ |
| 45 |
# "_key", |
| 46 |
# "ShortText" |
| 47 |
# ] |
| 48 |
# ], |
| 49 |
# [ |
| 50 |
# 2, |
| 51 |
# "Japan" |
| 52 |
# ] |
| 53 |
# ] |
| 54 |
# ] |
| 55 |
# ] |
| 56 |
select Users |
| 57 |
# [ |
| 58 |
# [ |
| 59 |
# 0, |
| 60 |
# 1337566253.89858, |
| 61 |
# 0.000355720520019531 |
| 62 |
# ], |
| 63 |
# [ |
| 64 |
# [ |
| 65 |
# [ |
| 66 |
# 4 |
| 67 |
# ], |
| 68 |
# [ |
| 69 |
# [ |
| 70 |
# "_id", |
| 71 |
# "UInt32" |
| 72 |
# ], |
| 73 |
# [ |
| 74 |
# "_key", |
| 75 |
# "UInt32" |
| 76 |
# ], |
| 77 |
# [ |
| 78 |
# "country", |
| 79 |
# "Country" |
| 80 |
# ], |
| 81 |
# [ |
| 82 |
# "name", |
| 83 |
# "ShortText" |
| 84 |
# ] |
| 85 |
# ], |
| 86 |
# [ |
| 87 |
# 1, |
| 88 |
# 1, |
| 89 |
# "", |
| 90 |
# "John" |
| 91 |
# ], |
| 92 |
# [ |
| 93 |
# 2, |
| 94 |
# 2, |
| 95 |
# "", |
| 96 |
# "Mike" |
| 97 |
# ], |
| 98 |
# [ |
| 99 |
# 3, |
| 100 |
# 3, |
| 101 |
# "Japan", |
| 102 |
# "Takashi" |
| 103 |
# ], |
| 104 |
# [ |
| 105 |
# 4, |
| 106 |
# 4, |
| 107 |
# "Japan", |
| 108 |
# "Hanako" |
| 109 |
# ] |
| 110 |
# ] |
| 111 |
# ] |
| 112 |
# ] |