{"id":14974047,"url":"https://github.com/bedquiltdb/bedquilt-core","last_synced_at":"2025-04-09T19:19:13.000Z","repository":{"id":21243517,"uuid":"24558935","full_name":"BedquiltDB/bedquilt-core","owner":"BedquiltDB","description":"A JSON document store on PostgreSQL","archived":false,"fork":false,"pushed_at":"2023-04-22T07:10:01.000Z","size":514,"stargazers_count":255,"open_issues_count":9,"forks_count":14,"subscribers_count":5,"default_branch":"master","last_synced_at":"2025-04-09T19:19:03.358Z","etag":null,"topics":["database","nosql","plpgsql","sql"],"latest_commit_sha":null,"homepage":"http://bedquiltdb.github.io","language":"PLpgSQL","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/BedquiltDB.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2014-09-28T12:25:55.000Z","updated_at":"2024-11-28T16:30:04.000Z","dependencies_parsed_at":"2024-01-14T15:25:49.317Z","dependency_job_id":"9312f035-bdbe-4a8f-8ee7-c11b6d533f81","html_url":"https://github.com/BedquiltDB/bedquilt-core","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BedquiltDB%2Fbedquilt-core","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BedquiltDB%2Fbedquilt-core/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BedquiltDB%2Fbedquilt-core/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BedquiltDB%2Fbedquilt-core/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BedquiltDB","download_url":"https://codeload.github.com/BedquiltDB/bedquilt-core/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248094991,"owners_count":21046770,"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":["database","nosql","plpgsql","sql"],"created_at":"2024-09-24T13:49:52.377Z","updated_at":"2025-04-09T19:19:12.978Z","avatar_url":"https://github.com/BedquiltDB.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Bedquilt\n\n[![Join the chat at https://gitter.im/BedquiltDB/bedquilt-core](https://badges.gitter.im/BedquiltDB/bedquilt-core.svg)](https://gitter.im/BedquiltDB/bedquilt-core?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\n![Bedquilt](./resources/bedquilt_logo_tile.png)\n\n[BedquiltDB](https://bedquiltdb.github.io) is a A JSON document-store built on PostgreSQL.\n\n[![CircleCI](https://circleci.com/gh/BedquiltDB/bedquilt-core/tree/master.svg?style=shield)](https://circleci.com/gh/BedquiltDB/bedquilt-core/tree/master)\n\n\n# Releases\n\nRelease packages for BedquiltDB can be found on [pgxn](http://pgxn.org/dist/bedquilt/).\n\n\n# Goals\n\n- Borrow some of the good ideas and positive attributes of json\n  object-stores and bring them to PostgreSQL\n- Harness the new jsonb functionality of PostgreSQL and wrap it in a nice\nprogrammatic API that is consistent across languages\n- Make use of SQL strong-points, such as schema constraints and table joins\n- Build a tool which is actually useful for developers\n\n\n# Documentation\n\nProject documnetation hosted at [Read The Docs](http://bedquiltdb.readthedocs.org).\n\nTo build documentation, install the `mkdocs` utility and run:\n```\n$ make docs\n```\n\n\n# Examples\n\nThis extension provides the core functionality of BedquiltDB, and can be used from ordinary SQL queries,\nthough it is recommended to use one of the driver libraries for you favourite programming language instead.\n\n```PLpgSQL\n-- Insert two documents into the 'people' collection.\nselect bq_insert(\n    'people',\n    '{\"_id\": \"sarah@example.com\",\n      \"name\": \"Sarah\",\n      \"likes\": [\"icecream\", \"code\"]}'\n);\nselect bq_insert(\n    'people',\n    '{\"name\": \"Mike\",\n      \"likes\": [\"code\", \"rabbits\"]}'\n);\n\n\n-- Find a single document,\n-- where the \"name\" field is the string value \"Mike\".\nselect bq_find_one(\n    'people',\n    '{\"name\":  \"Mike\"}'\n);\n\n\n-- Find all documents in the 'people' collection\nselect bq_find('people', '{}');\n\n\n-- Find all people who like icecream\nselect bq_find('people', '{\"likes\": [\"icecream\"]}');\n\n\n-- Find a single document by its \"_id\" field.\n-- This query hits the primary key index on the _id field\nselect bq_find_one_by_id('people', 'sarah@example.com');\n\n\n-- Create an empty collection\nselect bq_create_collection('things');\n\n\n-- Get a list of existing collections\nselect bq_list_collections();\n```\n\n\n# Drivers\n\nBedquiltDB is intended to be used with client libraries (aka Drivers), such as:\n\n- [pybedquilt](https://github.com/BedquiltDB/pybedquilt) for Python\n- [node-bedquilt](https://github.com/BedquiltDB/node-bedquilt) for NodeJS\n- [clj-bedquilt](https://github.com/BedquiltDB/clj-bedquilt) for Clojure\n\nInstallation instructions and documentation for each driver can be found on the\nrespective driver repositories.\n\nBedquiltDB can also be used directly through SQL queries: `select bq_find('users', '{...}')`.\n\n\n# Prerequisites\n\n- PostgreSQL \u003e= 9.5\n- PL/pgSQL\n- PL/Python3u\n- The pgcrypto extension\n\n\n## Development prerequisites\n\n- python \u003e=2.7\n- psycopg2 python library (`pip install pyscopg2`)\n- a local installation of PostgreSQL, with pgxs\n- mkdocs, for building documentation\n- gnu make\n\n\n# Installation\n\n## From a pre-built package (recommended)\n\nTo install BedquiltDB on your PostgreSQL server, follow the instructions here:\n\nhttp://bedquiltdb.readthedocs.org/en/latest/guide/installation/\n\n## From source\n\nIf you would prefer to install from source, first clone this repositroy:\n\n```\n$ git clone https://github.com/BedquiltDB/bedquilt-core.git\n$ cd bedquilt-core\n```\n\nRun the following to build the extension and install it to the local database:\n\n```\n$ sudo make install\n```\n\nRun this to build to a zip file:\n\n```\n$ make dist\n```\n\nThen, on the postgres server:\n\n```PLpgSQL\nCREATE EXTENSION IF NOT EXISTS pgcrypto;\nCREATE EXTENSION IF NOT EXISTS plpython3u;\nCREATE EXTENSION bedquilt;\n```\n\nTest out the bedquilt extension by running a simple `find` operation:\n\n```PlpgSQL\nselect bq_find('stuff', '{}');\n```\n\n\n# Tests\n\nRun `make test` to run the test suite. Requires a `bedquilt_test` database\nthat the current user owns.\n\n\n# Contributing\n\nContributions are welcome, to any of the BedquiltDB projects. Just open an issue,\nor get in touch directly.\n\n\n# License\n\nBedquilt is released under the [MIT License](./LICENSE.txt).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbedquiltdb%2Fbedquilt-core","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbedquiltdb%2Fbedquilt-core","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbedquiltdb%2Fbedquilt-core/lists"}