Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/melbournedeveloper/selecta
A model that represents SQL Select queries, and tools to convert from SQL/JSON to the model and back
https://github.com/melbournedeveloper/selecta
dart flutter orm sql
Last synced: 3 months ago
JSON representation
A model that represents SQL Select queries, and tools to convert from SQL/JSON to the model and back
- Host: GitHub
- URL: https://github.com/melbournedeveloper/selecta
- Owner: MelbourneDeveloper
- License: bsd-3-clause
- Created: 2024-02-24T00:54:48.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-08-18T23:51:11.000Z (5 months ago)
- Last Synced: 2024-08-19T23:49:35.803Z (5 months ago)
- Topics: dart, flutter, orm, sql
- Language: Dart
- Homepage: https://pub.dev/packages/selecta
- Size: 18 MB
- Stars: 2
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# selecta
A model that represents SQL Select queries, and tools to convert from SQL/JSON to the model and back
Try it out [here](https://melbournedeveloper.github.io/selecta/). This example uses the [arborio](https://pub.dev/packages/arborio) package to display the tree view.
![Video](https://github.com/MelbourneDeveloper/selecta/blob/main/documents/example.mov)
You can do like this:
```dart
final selectStatement = toSelectStatement('SELECT id, name FROM Users');
print('Columns: ${selectStatement.select} From: ${selectStatement.from}');
```Output
```
Columns: [ColumnReference (id), ColumnReference (name)] From: Users
```