{"id":16686251,"url":"https://github.com/xeaone/database","last_synced_at":"2026-02-11T21:04:51.801Z","repository":{"id":37594392,"uuid":"475625428","full_name":"xeaone/database","owner":"xeaone","description":"X-Database A Deno database client for Google Cloud Firestore.","archived":false,"fork":false,"pushed_at":"2024-03-13T20:16:00.000Z","size":152,"stargazers_count":3,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-09-17T13:27:00.458Z","etag":null,"topics":["database","datastore","deno","firebase","firestore","gcp","google","javascript","typescript"],"latest_commit_sha":null,"homepage":"","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/xeaone.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}},"created_at":"2022-03-29T21:28:58.000Z","updated_at":"2023-05-18T21:15:26.000Z","dependencies_parsed_at":"2024-01-29T21:53:08.195Z","dependency_job_id":"0a8e84b1-7fac-4c9d-8035-fba2ef7529a2","html_url":"https://github.com/xeaone/database","commit_stats":{"total_commits":62,"total_committers":1,"mean_commits":62.0,"dds":0.0,"last_synced_commit":"7af0bd485c4c1094bf4dd6a51ac31b6388ed6732"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/xeaone/database","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xeaone%2Fdatabase","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xeaone%2Fdatabase/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xeaone%2Fdatabase/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xeaone%2Fdatabase/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xeaone","download_url":"https://codeload.github.com/xeaone/database/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xeaone%2Fdatabase/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29345430,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T20:11:40.865Z","status":"ssl_error","status_checked_at":"2026-02-11T20:10:41.637Z","response_time":97,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["database","datastore","deno","firebase","firestore","gcp","google","javascript","typescript"],"created_at":"2024-10-12T15:05:07.549Z","updated_at":"2026-02-11T21:04:51.786Z","avatar_url":"https://github.com/xeaone.png","language":"TypeScript","readme":"[![deno module](https://shield.deno.dev/x/xdatabase)](https://deno.land/x/xdatabase) ![deno compatibility](https://shield.deno.dev/deno/^1.33.3) ![GitHub](https://img.shields.io/github/license/xeaone/database)\n\n# X-Database\n\nA Deno database client for Google Cloud Firestore.\n\n## Example\n\n```ts\nimport Database from 'https://deno.land/x/xdatabase/src/mod.ts';\n\nconst database = new Database();\n\ndatabase.credential('application');\ndatabase.project('google-cloud-project-id');\n\nconst id = crypto.randomUUID();\n\nconst user = await database.create('user', {\n    id,\n    age: 20,\n    phone: null,\n    active: true,\n    lastName: 'bar',\n    firstName: 'foo',\n}).identifier(id).end();\n\nconsole.log(user);\n\nconst users = await database\n    .search('user')\n    .equal({ firstName: 'foo' })\n    .limit(10).end();\n\nconsole.log(user);\n```\n\n## Auth\n\nIt is recommended to use the `'application'` String option this will use the Application Default Credential and will fallback to trying to use the Google Cloud service instance account credentials. You can initialize the Application Default Credential using this command `gcloud auth application-default login`. Alternatively you can pass a ServiceAccountCredentials key Object, ApplicationDefaultCredentials key Object, or the `'meta'` String. The option to manually use `'meta'` is nice for production because the only deno permission you should need is network.\n\n- `'meta'`\n  - `http://metadata.google.internal`\n- `'application'` Deno permissions read\n  - Windows: `%APPDATA%\\gcloud\\application_default_credentials.json`\n  - Linux/Mac: `$HOME/.config/gcloud/application_default_credentials.json`\n\n## API\n\n### `id(id: string): this`\n\nThe database id default is `(default)`\n\n### `project(project: string): this`\n\nThe GCP project name.\n\n### `credential(credential: 'meta' | 'application' | ServiceAccountCredentials | ApplicationDefaultCredentials): this`\n\n- `meta`\n- `application`\n- `ServiceAccountCredentials`\n- `ApplicationDefaultCredentials`\n\n### `search(collection: string)`\n\n```ts\nconst users = await database.search('user').equal({ id: '1' }).end();\n```\n\n### `view(collection: string)`\n\n```ts\nconst user = await database.view('user').equal({ id: '1' }).end();\n```\n\n### `remove(collection: string)`\n\n```ts\nconst user = await database.remove('user').identifier('1').end();\n```\n\n### `create(collection: string, data: Data)`\n\n```ts\nconst user = await database.create('user', {\n    id: '1',\n    name: 'foo bar',\n    age: 42,\n}).identifier('1').end();\n```\n\n### `update(collection: string, data: Data)`\n\n```ts\nconst user = await database.update('user', { age: 69 }).equal({ id: '1' })\n    .end();\n```\n\n### `commit(collection: string, data: Data)`\n\n```ts\nconst user = await database.commit('user').equal({ id: '1' }).increment({\n    age: 1,\n}).end();\n```\n\n### `Options`\n\n```ts\n// All Except Search:\nidentifier(string)\n\n// All Except Set: Property starts with filter\nstartsWith(Array\u003cstring\u003e)\n\n// All Except Set:\nin(Array\u003cstring\u003e)\n\n// All Except Set:\nnotIn(Array\u003cstring\u003e)\n\n// All Except Set: default\nequal(Array\u003cstring\u003e)\n\n// All Except Set:\nnotEqual(Array\u003cstring\u003e)\n\n// All Except Set:\nlessThan(Array\u003cstring\u003e)\n\n// All Except Set:\nlessThanOrEqual(Array\u003cstring\u003e)\n\n// All Except Set:\narrayContains(Array\u003cstring\u003e)\n\n// All Except Set:\narrayContainsAny(Array\u003cstring\u003e)\n\n// All Except Set:\ngreaterThan(Array\u003cstring\u003e;\n\n// All Except Set:\ngreaterThanOrEqual(Array\u003cstring\u003e)\n\n// Search: orders results by property name/s\nascending(Array\u003cstring\u003e)\ndescending(Array\u003cstring\u003e)\n\n// Search:\n// Firestore: https://firebase.google.com/docs/firestore/reference/rest/v1/StructuredQuery#FIELDS.start_at\nstart(Array\u003cRecord\u003cstring, Data\u003e\u003e)\n\n// Search:\n// Firestore: https://firebase.google.com/docs/firestore/reference/rest/v1/StructuredQuery#FIELDS.end_at\nend(Array\u003cRecord\u003cstring, Data\u003e\u003e)\n\n// Search: The maximum number of results to return.\n// Firestore: https://firebase.google.com/docs/firestore/reference/rest/v1/StructuredQuery#FIELDS.limit\nlimit(number)\n\n// Search: The number of results to skip.\n// Firestore: https://firebase.google.com/docs/firestore/reference/rest/v1/StructuredQuery#FIELDS.offset\noffset(number)\n\n// Set: property name/s to increment\n// https://firebase.google.com/docs/firestore/reference/rest/v1/Write#FieldTransform.FIELDS.increment\nincrement(Array\u003cstring\u003e)\n\n// Set: property name/s to append missing elements\n// Firestore: https://firebase.google.com/docs/firestore/reference/rest/v1/Write#FieldTransform.FIELDS.append_missing_elements\nappend(Array\u003cstring\u003e)\n```\n\n\u003c!--\nFirestore reset api docs\nhttps://firebase.google.com/docs/firestore/reference/rest/v1/projects.databases.documents\n--\u003e\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxeaone%2Fdatabase","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxeaone%2Fdatabase","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxeaone%2Fdatabase/lists"}