{"id":28991340,"url":"https://github.com/xtdb/driver-examples","last_synced_at":"2025-06-25T01:16:45.254Z","repository":{"id":268757163,"uuid":"905324649","full_name":"xtdb/driver-examples","owner":"xtdb","description":"Minimal XTDB examples for various langs - start in \u003c5m with GitHub Codespaces","archived":false,"fork":false,"pushed_at":"2025-05-25T12:36:37.000Z","size":757,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-25T13:38:32.453Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://codespaces.new/xtdb/driver-examples","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/xtdb.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,"zenodo":null}},"created_at":"2024-12-18T15:43:54.000Z","updated_at":"2025-05-25T12:36:40.000Z","dependencies_parsed_at":"2024-12-18T18:38:55.250Z","dependency_job_id":"50687ab0-6b00-4c8e-9e38-92a903a5f589","html_url":"https://github.com/xtdb/driver-examples","commit_stats":null,"previous_names":["xtdb/driver-examples"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/xtdb/driver-examples","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtdb%2Fdriver-examples","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtdb%2Fdriver-examples/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtdb%2Fdriver-examples/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtdb%2Fdriver-examples/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/xtdb","download_url":"https://codeload.github.com/xtdb/driver-examples/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/xtdb%2Fdriver-examples/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261783470,"owners_count":23208957,"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":"2025-06-25T01:16:44.708Z","updated_at":"2025-06-25T01:16:45.244Z","avatar_url":"https://github.com/xtdb.png","language":"C","readme":"# XTDB Driver Examples\n\nThis [Dev Container](https://containers.dev/) environment is a [monorepo](https://github.com/xtdb/driver-examples) that is primarily intended for use with GitHub Codespaces. This environment showcases how to use [XTDB](https://xtdb.com/) from a variety of languages and runtimes in a convenient sandbox.\n\nTo very simply get started, without any local installation, create your own GitHub Codespace in the cloud and use the browser-based VS Code tooling:\n\n[![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/xtdb/driver-examples)\n\nOnce the Codespace loads (note: this can take several minutes), you can start running SQL queries against XTDB!\n\nIf you would like to run the Dev Container setup fully locally (offline, and without a GitHub account) you can use VS Code or docker-compose directly - see the instructions within `.devcontainer/README.md` for guidance.\n\n## Running your first queries\n\nThe VSCode 'SQL Tools' extension is pre-configured to connects to the running XTDB Docker container. You can use this extension to explore the database and run queries.\n\nAlternatively open the terminal and run: `psql -h xtdb xtdb`\n\nYou should now be able to execute a query like `SELECT 1 + 1`\n\n## Plenty to explore\n\nWithin the `driver-examples` directory you will find a range of subdirectories for various languages, where each contains a minimal example as well as a `run.sh` script that you can use to execute the example (the script will also first install the dependencies).\n\nAll examples are connected to the same XTDB instance, running as an *ephemeral* Docker container within the sandbox environment (no data is persisted).\n\nFeel free to hack on the examples - your Codespace is your own to explore!\n\n## Help\n\nDebug logs for the XTDB container can be found under `logs/xtdb.log`.\n\nFor any assistance or questions, please [open an issue](https://github.com/xtdb/driver-examples) or post on [the forums](https://discuss.xtdb.com/). PRs are welcome too!\n\n### Running locally (and testing changes)\n\nWith Docker Compose installed, clone [this repo](https://github.com/xtdb/driver-examples) then run:\n\n`cd driver-examples/.devcontainer`\n`docker compose build`\n`docker compose up -d`\n`docker exec -it --user codespace app /bin/bash`\n\nNote that you will likely still need an internet connection after the containers have started to download dependencies.\n\nWhen finished, you can shut down the containers using: `docker compose down`\n\n### Use `asdf` to manage additional installations\n\nRun `sudo su` - the `asdf` command should now be available to install new things. Alternatively, use `sudo /root/.asdf/bin/asdf ...`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtdb%2Fdriver-examples","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fxtdb%2Fdriver-examples","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fxtdb%2Fdriver-examples/lists"}