REQUIRES: tera.flag in current work directory; table `oops' was created
()
| 42 | |
| 43 | |
| 44 | def main(): |
| 45 | """ REQUIRES: |
| 46 | tera.flag in current work directory; |
| 47 | table `oops' was created |
| 48 | """ |
| 49 | try: |
| 50 | client = Client("./tera.flag", "pysdk") |
| 51 | except TeraSdkException as e: |
| 52 | print(e.reason) |
| 53 | return |
| 54 | try: |
| 55 | table = client.OpenTable("oops") |
| 56 | except TeraSdkException as e: |
| 57 | print(e.reason) |
| 58 | return |
| 59 | |
| 60 | # sync put |
| 61 | sync_put(table) |
| 62 | |
| 63 | # sync get |
| 64 | sync_get(table) |
| 65 | |
| 66 | # sync put batch |
| 67 | sync_put_batch(table) |
| 68 | |
| 69 | # sync get batch |
| 70 | sync_get_batch(table) |
| 71 | |
| 72 | # scan (stream) |
| 73 | scan(table) |
| 74 | |
| 75 | # async put |
| 76 | async_put(table) |
| 77 | |
| 78 | # async get |
| 79 | async_get(table) |
| 80 | |
| 81 | put_get_with_timestamp(table) |
| 82 | |
| 83 | table.Close() |
| 84 | client.Close() |
| 85 | print("main() done\n") |
| 86 | |
| 87 | |
| 88 | def sync_put(table): |
no test coverage detected