{"id":23291106,"url":"https://github.com/the-forgebase/surreal-builders","last_synced_at":"2025-04-06T17:44:49.508Z","repository":{"id":257814047,"uuid":"869230870","full_name":"The-ForgeBase/surreal-builders","owner":"The-ForgeBase","description":null,"archived":false,"fork":false,"pushed_at":"2024-11-11T13:33:50.000Z","size":47,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-16T11:19:55.742Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/The-ForgeBase.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-08T00:16:35.000Z","updated_at":"2024-11-11T13:33:53.000Z","dependencies_parsed_at":null,"dependency_job_id":"7f623c70-1927-44e4-9907-ab8a84e6dc44","html_url":"https://github.com/The-ForgeBase/surreal-builders","commit_stats":{"total_commits":22,"total_committers":1,"mean_commits":22.0,"dds":0.0,"last_synced_commit":"85362fc0ff303145ad03a2d71b381faf900a5dca"},"previous_names":["sog-web/surreal-builders","the-baas-framework/surreal-builders"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-ForgeBase%2Fsurreal-builders","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-ForgeBase%2Fsurreal-builders/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-ForgeBase%2Fsurreal-builders/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/The-ForgeBase%2Fsurreal-builders/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/The-ForgeBase","download_url":"https://codeload.github.com/The-ForgeBase/surreal-builders/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247526675,"owners_count":20953141,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-20T05:14:09.376Z","updated_at":"2025-04-06T17:44:49.485Z","avatar_url":"https://github.com/The-ForgeBase.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Surreal Builders\n\n## Overview\n\n**Surreal Builders** is a collection of TypeScript libraries designed to work with SurrealDB. The goal is to provide an intuitive, composable TypeScript API for interacting with SurrealDB. This will also sever as the typescript sdk for all typescript supported client\n\n### Surreal Query (current work)\n\nOne of the key libraries in this repo is **surreal-query**, a TypeScript API that allows you to build queries dynamically with a fluent interface.\n\nExample usage:\n\n```typescript\n// Create query builder\nconst queryBuilder = new SurrealQuery\u003cany\u003e(\"person\")\n\t\t\t.setNamespaceAndDb(\"test_namespace\", \"test_db\")\n\t\t\t.filter(\"age\", 30) // Defaults to AND clause\n\t\t\t.filter(\"name\", \"John\", \"=\", \"OR\") // OR clause\n\t\t\t.filter(\"status\", \"active\");\n\n// Get the query payload\nconst queryPayload = queryBuilder.getQueryPayload(\"SELECT\");\nconsole.log(\"Query payload:\", queryPayload);\n```\nto produce\n`\"SELECT * FROM person WHERE age = '30' AND name = 'John' OR status = 'active'\"`\n\nThis simple example demonstrates how to build queries in a flexible, composable manner for SurrealDB.\n\n### Key Features:\n- **Composable Queries**: Easily chain methods to build complex SURREALQL queries.\n- **TypeScript Support**: Fully typed API to ensure type safety and autocompletion.\n- **Fluent Interface**: Build queries using a clear, easy-to-read syntax.\n\n## Project Status\n\nSurreal Builders is currently in active development. The first versions of these libraries, including surreal-query, are being refined and will be released soon. Stay tuned!\n\n## Get Involved\n\nIf you'd like to contribute, feel free to fork the repository, open issues, or suggest improvements. Contributions are welcome and encouraged!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-forgebase%2Fsurreal-builders","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthe-forgebase%2Fsurreal-builders","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthe-forgebase%2Fsurreal-builders/lists"}