Toql 0.4

48 points artos3

I'm happy to release Toql 0.4.

Toql is an ORM with support for async databases. It allows to derive you structs and do nested operations on them. It's a non owning ORM that aims to build boilerplate SQL, so you can focus on the SQL that is more interesting. It gives a lot of compile time feedback, which is nice if you have RA running.

One feedback I got last month - when I release Toql 0.3 - was that I should focus on tests next. That's what I did. Tarpaulin reports now 87% line coverage. Apart from unit tests I wrote a mocking database backend that allows to introspect SQL and to mock rows. So I was able to test a lot of nested scenarios and role permission stuff. Tarpaulin together with VSCode Coverage Gutters provide such a great experience.
I also wrote tests for the Toql Guide: Now \~ 65 code examples pass.

In the 0.4 version I got rid of darling for derive parsing and use now syn. Darling was wonderful when I started with Rust. Meanwhile (3 years later) I have developped and so syn has. So I have rewritted the derive parsing code and use the enhanced control for better error messages and slicker attribute syntax. The syntax in 0.4 is slightly incompatble with 0.3 (boolean attributes).

For more details on changes check out the CHANGELOG.md or to give it a try you may want to run the todo example (MySQL server needed) .

My motivation for Toql are twofold: First in the past I had a not so good experience with Doctrine (PHP) and EclipseLink (Java) so I wrote the ORM I wished to have for myself (simple, yet powerful and predictable). Second I have thought for a long time that there is a tradeoff between programing languages: Either they are fast and uncomfortable versus slow and dev friendly. Imho with Rust this does not hold true anymore. The power of the language itself but also the ability to write proc macros together with RA bring in a new experience. Toql is my personal research project on that.

What's next? This year I won't have time anymore to work on Toql, but next year I plan to support more databases. Toql has it's own backend abstraction and supports current only MySQL and the MockDb driver. Postgres is the obvious candidate..

Happy December