You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Proof of concept in the f-272-immediate branch, with two separate PqResultImpl classes. It feels easier to keep both behaviors in one class. We need to
Memoize sql argument so that PQsendQuery() can be called in bind()
Have a non-const cache
Call prepare() later (it can't return a PGresult*)
Call it in the constructor or not? Check what RMariaDB does, RSQLite also calls in the constructor
Test behavior with multiple queries and statements
Rethink when to call wait_for_data(), and when to query sockets
Exploding join:
names<-letters[1:21]
sql<-
paste0(
"SELECT * FROM ",
paste0("(SELECT 1 AS ", names, " UNION ALL SELECT 2 AS ", names, ") ", names, collapse=" CROSS JOIN\n")
)
writeLines(sql)
#> SELECT * FROM (SELECT 1 AS a UNION ALL SELECT 2 AS a) a CROSS JOIN#> (SELECT 1 AS b UNION ALL SELECT 2 AS b) b CROSS JOIN#> (SELECT 1 AS c UNION ALL SELECT 2 AS c) c CROSS JOIN#> (SELECT 1 AS d UNION ALL SELECT 2 AS d) d CROSS JOIN#> (SELECT 1 AS e UNION ALL SELECT 2 AS e) e CROSS JOIN#> (SELECT 1 AS f UNION ALL SELECT 2 AS f) f CROSS JOIN#> (SELECT 1 AS g UNION ALL SELECT 2 AS g) g CROSS JOIN#> (SELECT 1 AS h UNION ALL SELECT 2 AS h) h CROSS JOIN#> (SELECT 1 AS i UNION ALL SELECT 2 AS i) i CROSS JOIN#> (SELECT 1 AS j UNION ALL SELECT 2 AS j) j CROSS JOIN#> (SELECT 1 AS k UNION ALL SELECT 2 AS k) k CROSS JOIN#> (SELECT 1 AS l UNION ALL SELECT 2 AS l) l CROSS JOIN#> (SELECT 1 AS m UNION ALL SELECT 2 AS m) m CROSS JOIN#> (SELECT 1 AS n UNION ALL SELECT 2 AS n) n CROSS JOIN#> (SELECT 1 AS o UNION ALL SELECT 2 AS o) o CROSS JOIN#> (SELECT 1 AS p UNION ALL SELECT 2 AS p) p CROSS JOIN#> (SELECT 1 AS q UNION ALL SELECT 2 AS q) q CROSS JOIN#> (SELECT 1 AS r UNION ALL SELECT 2 AS r) r CROSS JOIN#> (SELECT 1 AS s UNION ALL SELECT 2 AS s) s CROSS JOIN#> (SELECT 1 AS t UNION ALL SELECT 2 AS t) t CROSS JOIN#> (SELECT 1 AS u UNION ALL SELECT 2 AS u) u
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.
Activity
krlmlr commentedon Sep 19, 2021
Proof of concept in the
f-272-immediatebranch, with two separatePqResultImplclasses. It feels easier to keep both behaviors in one class. We need tosqlargument so thatPQsendQuery()can be called inbind()cacheprepare()later (it can't return aPGresult*)wait_for_data(), and when to query socketsExploding join:
Created on 2021-09-19 by the reprex package (v2.0.1)
Wait arbitrary time with
pg_sleep().Merge pull request #338 from r-dbi/f-272-immediate-2
github-actions commentedon Sep 26, 2022
This old thread has been automatically locked. If you think you have found something related to this, please open a new issue and link to this old issue if necessary.