git clone https://github.com/dan-strohschein/SyndrDB.git cd SyndrDB
# Build (creates bin/server/server) ./build.sh # Build and run tests ./build.sh test
# Start with defaults (TCP on 1776) ./bin/server/server # Or customize ./bin/server/server -datadir=./my_data -port=1776 -graphql
That's it! 🎉 SyndrDB is now running and ready for connections.
-- Create a database CREATE DATABASE "MyApp"; -- Create a bundle (think: table meets collection) CREATE BUNDLE "users" WITH FIELDS ( {"name", STRING, true, false, ""}, {"email", STRING, true, true, ""}, {"age", INT, false, false, 0}, {"is_active", BOOL, false, false, true} ); -- Add documents ADD DOCUMENT TO BUNDLE "users" WITH ( {"name" = "Alice Johnson"}, {"email" = "alice@example.com"}, {"age" = 28} ); -- Query with powerful WHERE clauses SELECT name, email, age FROM "users" WHERE (age >= 25 AND is_active == true) ORDER BY name ASC LIMIT 10; -- JOIN across bundles (with relationships! ) SELECT u. name, o.total, o.status FROM "users" u JOIN "orders" o ON u.id == o.user_id WHERE o.status == "pending" ORDER BY o.created_at DESC;
# Query your data query { users(where: "age >= 25", limit: 10) { edges { node { id name email orders { total status } } } } } # Mutations work too mutation { createUser(input: { name: "Bob Smith" email: "bob@example.com" age: 32 }) { id name } }