Crates.io | toql_mysql |
lib.rs | toql_mysql |
version | 0.1.2 |
source | src |
created_at | 2019-05-15 17:19:13.251613 |
updated_at | 2019-05-20 11:52:45.387874 |
description | Library with mysql integration for toql |
homepage | |
repository | https://github.com/roy-ganz/toql |
max_upload_size | |
id | 134532 |
size | 9,046 |
Toql Transfer object query language is a query language to build SQL statements. It can retrieve filtered, ordered and indiviually selected columns from a database and put the result into your structs.
Toql turns this
id, (+age eq 16; age eq 18), address_street
into
SELECT user.id, user.age, address.street
FROM User user LEFt JOIN Address address ON (user.address_id= address.id)
WHERE user.age = 16 OR user.age = 18
ORDER BY user.age ASC
for all your Toql
derived structs.
There is also a guide and the API documentation.
Add this to your Cargo.toml
:
[dependencies]
toql = { version = "0.1", features = ["mysql"] }
Toql works well with Rocket: Add this to your Cargo.toml
[dependencies]
toql_rocket = { version = "0.1", features = ["mysql"] }
Right now there is only support for MySql
. Add features = ["mysql"]
to your Cargo.toml
dependencies.
Toql Transfer object query language is a query language to build SQL statements. It can retrieve filtered, ordered and indiviually selected columns from a database and put the result into your structs.
Toql
can query, insert, update and delete single and multiple database records.
handles dependencies in queries through SQL joins and merges. Cool!
is fast, beause the mapper is only created once and than reused.
has high level functions for speed and low level functions for edge cases.
My near term goal is to support for more web frameworks and databases. However I would like to stabilize the API first. So you are welcome to play around and test it (don't use it in production yet). Comments, bug fixes and quality improvements are welcome. For features please hold on.
I have developed the initial Toql language about 7 years ago for a web project. I have refined it since then and you can see it in action on www.schoolsheet.com, a web service I created in Java for my teaching. The Rust implementation is must faster though ;)
Toql is distributed under the terms of both the MIT license and the Apache License (Version 2.0).