{"repo":"mibk/dali","free":true,"listed":false,"github":"https://github.com/mibk/dali","clone":"git clone https://github.com/mibk/dali.git","description":"a thin layer over Go's database/sql","language":"Go","stars":28,"topics":["go","golang","golang-library","database"],"license":"MIT","category":"databases-storage","readme_excerpt":"&nbsp; Database Abstraction Layer (í) DALí is not exactly a database abstraction layer. It doesn't try to abstract the SQL in a way that the queries could run unchanged on any supported database. It rather abstracts just the placeholder manipulation and provides convenient ways for some common situations. The main goal of this project is to provide a clean, compact API for communication with SQL databases. Quickstart Installation Caveats DALí processes the query unaware of the actual SQL syntax. This means it is quite stupid on deciding whether the placeholder is inside a string literal. To avoid this just use the whole string as a parameter. Features Identifier escaping This feature comes from the need to fix the clumsy way of escaping identifiers in MySQL in Go's raw string literals. So instead of you can use So there is one way to escape identifiers among all dialects. Handy placeholders Again, placeholder manipulation is the same for all dialects and besides that it also provides some additional placeholders. The complete list is: Using the placeholders it is easy and quite expressive to write common SQL queries, but it is also possible to adjust these queries to a specific need (which is often not so easy when using query builders). Note : only ? , ?ident , ?ident... , and ?sql are allowed in prepared statements (see the method Prepare for more information). Profiling and other Using the DB.SetMiddlewareFunc it is possible to do additional operations before and after exe","default_branch":null,"files":null,"tree":[],"storefront":"/r/mibk","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mibk/dali/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}