toql 0.1.5

The toql query language
Documentation

Toql

Description

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), adress_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.

Resources

Check out the CRUD example. There is also a guide and the API documentation.

Installation

Add this to your Cargo.toml:

[dependencies]
toql = { version = "0.1", features= ["rocket_mysql"] }

Features

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.

Contribution

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.

Other database projects

Background

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 ;)

License

Toql is distributed under the terms of both the MIT license and the Apache License (Version 2.0).