If I have the query:
sql`SELECT * FROM foo WHERE a = ${some_big_value} OR b = ${some_big_value}`
it should ideally generate:
{
text: `SELECT * FROM foo WHERE a = $1 OR b = $1,
values: [some_big_value]
}
rather than
{
text: `SELECT * FROM foo WHERE a = $1 OR b = $2,
values: [some_big_value, some_big_value]
}
I've implemented this via my own formatFunction here: rocicorp/mono#4112
but seems like this should be an option in the library.