summary refs log tree commit diff
path: root/src/test/rethink_test.ts.disabled
diff options
context:
space:
mode:
authorFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-07-11 11:05:40 +0200
committerFlam3rboy <34555296+Flam3rboy@users.noreply.github.com>2021-07-11 11:05:40 +0200
commit2f68beea8f739062ae94f833331ac639005a424b (patch)
tree1d823c5c23719229972e96b6238f1eda589ff5b3 /src/test/rethink_test.ts.disabled
parent:art: clean up bundle script (diff)
downloadserver-2f68beea8f739062ae94f833331ac639005a424b.tar.xz
:heavy_minus_sign: delete rethink
Diffstat (limited to 'src/test/rethink_test.ts.disabled')
-rw-r--r--src/test/rethink_test.ts.disabled34
1 files changed, 0 insertions, 34 deletions
diff --git a/src/test/rethink_test.ts.disabled b/src/test/rethink_test.ts.disabled
deleted file mode 100644

index d1470515..00000000 --- a/src/test/rethink_test.ts.disabled +++ /dev/null
@@ -1,34 +0,0 @@ -import { r } from "rethinkdb-ts"; - -async function main() { - const connection = await r.connect({ port: 28015 }); - - const db = r.db("test"); - const cursor = await db - .table("guilds") - .get(0) - .changes({ squash: true }) - .map(function (row) { - return row("old_val") - .keys() - .setUnion(row("new_val").keys()) - .concatMap(function (key) { - return r.branch( - row("old_val")(key).ne(row("new_val")(key)).default(true), - [[key, row("new_val")(key).default(null)]], - [] - ); - }) - .coerceTo("object"); - }) - .run(connection); - - console.log("each"); - cursor.each(function (err, row) { - if (err) throw err; - console.log(row); - }); - console.log("eachend"); -} - -main();