Add Ormin ORM support for BaraDB (Nim client)
CI / test (push) Has been cancelled
CI / verify (push) Has been cancelled
Clients CI / build-server (push) Has been cancelled
Clients CI / test-python (push) Has been cancelled
Clients CI / test-javascript (push) Has been cancelled
Clients CI / test-nim (push) Has been cancelled
Clients CI / test-rust (push) Has been cancelled

This commit is contained in:
2026-05-15 21:49:08 +03:00
parent 2e945c1dcb
commit 4e54075078
63 changed files with 9764 additions and 0 deletions
+47
View File
@@ -0,0 +1,47 @@
switch("nimcache", ".nimcache")
task buildimporter, "Build ormin_importer":
exec "nim c -o:./tools/ormin_importer tools/ormin_importer"
task clean, "Clean generated files":
rmFile("tests/forum_model_sqlite.nim")
rmFile("tests/model_sqlite.nim")
rmFile("tests/forum_model_postgres.nim")
rmFile("tests/model_postgre.nim")
task test, "Run all test suite":
buildimporterTask()
cleanTask()
exec "nim c -f -r tests/tfeature"
exec "nim c -f -r tests/tcommon"
exec "nim c -f -r -d:release tests/tquery_types"
exec "nim c -f -r tests/tsqlite"
exec "nim c -f -r tests/tdb_utils"
exec "nim c -f -r tests/timportstatic"
task setup_postgres, "Ensure local Postgres has test DB/user":
# Use a simple script to avoid Nim/psql quoting pitfalls
exec "bash -lc 'bash tools/setup_postgres.sh'"
task test_postgres, "Run PostgreSQL test suite":
cleanTask()
buildimporterTask()
# setup_postgresTask()
# Pre-generate Postgres models to avoid include timing issues
exec "./tools/ormin_importer tests/forum_model_postgres.sql"
exec "./tools/ormin_importer tests/model_postgre.sql"
exec "nim c -f -d:nimDebugDlOpen -r -d:postgre tests/tfeature"
exec "nim c -f -d:nimDebugDlOpen -r -d:postgre tests/tcommon"
exec "nim c -f -d:nimDebugDlOpen -r -d:release -d:postgre tests/tquery_types"
exec "nim c -f -d:nimDebugDlOpen -r -d:postgre tests/tpostgre"
task buildexamples, "Build examples: chat and forum":
buildimporterTask()
selfExec "c examples/chat/server"
selfExec "js examples/chat/frontend"
selfExec "c examples/forum/forum"
selfExec "c examples/forum/forumproto"
selfExec "c examples/tweeter/src/tweeter"