Merge / append / concatenate two QueryBuilders?

52 Views Asked by At

I have many sqlx::QueryBuilder, can I merge them together?

Example:

let first: QueryBuilder<'a, sqlx::Postgres> = QueryBuilder::new(r"1 ");

let mut third = QueryBuilder::new(" 3");

first.push(" 2");

first.append(third) // append() doesn't exists

assert_eq!(first.sql(), "1 2 3");

Is this possible today somewhat?

0

There are 0 best solutions below