sql-builder
sql-builder copied to clipboard
Simple SQL code generator.
Adding the following `SqlBuilder` methods to support `REGEXP` searches: - `and_where_regexp(field, regexp)` - `and_where_not_regexp(field, regexp)` - `or_where_regexp(field, regexp)` - `or_where_not_regexp(field, regexp)` Along with added doctests & unittests
I want to construct a query that looks as following: ```sql SELECT * FROM table WHERE field1 = '' OR (field2 = '' AND field3 = ''); ``` The code...
This adds an example for how to accomplish #12 to the examples dir: ``` $ cargo run --example compound_where -q SELECT * FROM table WHERE field1 = '' OR ((field2...
It would be nice to have support for common table expressions: [https://www.postgresql.org/docs/13/queries-with.html](https://www.postgresql.org/docs/13/queries-with.html) Are there any plans to include this functionality in a future version? Would be willing to contribute as...
Is there now (or in the future) UUID support or should I just convert to a string? ```rust pub async fn find_by_id(ctx: &Context
Hi, I've been trying to find the proper input to make a query for some columns where a timestamptz field is less than today. For the column field DATE() SQL...
ignore like mask is "" or feild is ""
E.g. `where column like '%\%d%' escape '\'` to match any string with the `%d` substring. https://www.sqlite.org/lang_expr.html#the_like_glob_regexp_match_and_extract_operators
Hey, can we add a function for postgres array text, something similar or better than this? ```rust use serde::Serialize; use sql_builder::quote; use std::fmt::Display; pub fn pg_array(value: &[T]) -> String {...