Ryan Leckey
Ryan Leckey
You should be able to get support by turning off the prepared statement cache. Set the cache capacity to 0. See https://docs.rs/sqlx/0.5.5/sqlx/postgres/struct.PgConnectOptions.html#method.statement_cache_capacity I haven't tried it but from the OP...
`.build()` on the pool could have a variant that takes a closure. That sounds very nice. Perhaps: ```rust let pool = PgPool::new_from(|| async move { ... }).await?; let pool =...
I think just a closure is enough to implement caches and timeouts from the application. I'm not sure how much we want of that in core. Would you agree? We...
Depends on the database. For instance, you can add `?sslmode=disable` for postgres.
@Proximyst This is unfortunately blocked on: https://github.com/rust-lang/cargo/issues/3494
```sql INSERT INTO service_statuses (ip, state) VALUES ($1, $2) ON CONFLICT (ip) DO UPDATE SET state = $1 ``` Are you sure that's right? You are setting `ip` to `$1`...
Ah you need https://docs.rs/sqlx/0.4.2/sqlx/macro.query.html#type-overrides-bind-parameters-postgres-only ```rust query!( r#" INSERT INTO service_statuses (ip, state) VALUES ($1, $2) ON CONFLICT (ip) DO UPDATE SET state = $1 "#, one as _, two as...
#### Option 4 ```rust sqlx::database!(name = "foo", url = "env:FOO_DATABASE_URL"); // [...] let rows = foo::query!("SELECT * FROM bar WHERE x = ?val", val = 10) .fetch_all(&mut conn)?; ``` ---...
I like the idea of `name` being "use the same URL but change the name to this". I don't like `!(mod foo,` as syntax. I'd probably prefer the 3-line `mod...
> What else is it going to produce besides a mod, presumably pub(crate)? That's a really good reason for me to not generate the rust module at all. I hadn't...