https://github.com/facebookincubator/cg-sql
CG/SQL is a compiler that converts a SQL Stored Procedure like language into C for SQLite. SQLite has no stored procedures of its own. CG/CQL can also generate other useful artifacts for testing and schema maintenance.
https://github.com/facebookincubator/cg-sql
c c-lang sql sqlite
Last synced: 6 months ago
JSON representation
CG/SQL is a compiler that converts a SQL Stored Procedure like language into C for SQLite. SQLite has no stored procedures of its own. CG/CQL can also generate other useful artifacts for testing and schema maintenance.
- Host: GitHub
- URL: https://github.com/facebookincubator/cg-sql
- Owner: facebookincubator
- License: mit
- Archived: true
- Created: 2020-08-17T19:50:33.000Z (over 5 years ago)
- Default Branch: main
- Last Pushed: 2023-05-01T23:31:42.000Z (over 2 years ago)
- Last Synced: 2025-06-09T02:05:10.288Z (7 months ago)
- Topics: c, c-lang, sql, sqlite
- Language: HTML
- Homepage: https://cgsql.dev/
- Size: 334 MB
- Stars: 398
- Watchers: 18
- Forks: 34
- Open Issues: 5
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
CG/SQL
CG/SQL is a code generation system for the popular SQLite library that allows developers to write stored procedures in a variant of Transact-SQL (T-SQL) and compile them into C code that uses SQLite’s C API to do the coded operations. CG/SQL enables engineers to create highly complex stored procedures with very large queries, without the manual code checking that existing methods require.
The full system also includes features for managing and upgrading schema, creating test code for stored procedures, getting query plans for procedures, as well as interfacing with stored procedures from other languages, such as Java and Objective-C. The JSON output allows for the creation of even more analysis or interfacing code. The package includes extensive documentation on the language and system.
Find out more at our [website](https://cgsql.dev/).
## Getting Started
Please refer to our documentation to start using CG/SQL:
- [CG/SQL Language Summary](https://cgsql.dev/docs/introduction)
- [Getting Started with CG/SQL](https://cgsql.dev/docs/getting-started)
- [Writing a Hello World Program](https://cgsql.dev/cql-guide/ch01#getting-started)
- [Playground](https://cgsql.dev/docs/playground)
For Contributors:
- [Typical Dev Cycle](https://cgsql.dev/docs/dev-notes)
- [Testing CG/SQL](https://cgsql.dev/docs/testing)
- [Code Coverage](https://cgsql.dev/docs/code-coverage)
## Licensing
CG/SQL is [MIT-licensed](./LICENSE).