Commit Graph

9 Commits

Author SHA1 Message Date
Vikram Rangnekar bac89d8301 fix: i will not prematurely optimization 2020-05-29 02:23:54 -04:00
Vikram Rangnekar 2241364d00 fix: rewrite the sql args and variables codebase to use expression values 2020-05-26 19:41:28 -04:00
Vikram Rangnekar ccab367351 fix: make array variables work again 2020-05-24 17:43:54 -04:00
Vikram Rangnekar 1344246287 fix: add http tracing so end-to-end tracing is possible 2020-05-24 02:24:24 -04:00
Vikram Rangnekar 84d55dbc8a feat: remove data from variables saved to allow.list 2020-05-07 10:27:40 -04:00
Vikram Rangnekar ae7cde0433 feat: add support for single argument Postgres functions 2020-04-22 20:51:14 -04:00
Hiram Chirino 966aa9ce8c
feat: add some initial introspection support. (#52) 2020-04-19 23:48:49 -04:00
Hiram Chirino 4cf7956ff5
feat: add cockroachdb support. (#50)
This PR changes the generated SQL so that it's also compatible with CockroachDB.
Notable changes:
* use `SELECT to_jsonb("__sr_0".*)`  instead of `SELECT to_jsonb("__sr_0")`
* don't use `json_populate_record`, use the `CAST` and `->>` instead.  For example:

  instead of: `SELECT "t"."full_name", "t"."email" FROM "_sg_input" i, json_populate_record(NULL::users, i.j) t`

  do: `CAST( i.j ->>'full_name' AS character varying), CAST( i.j ->>'email' AS character varying) FROM "_sg_input" i`

This PR also adds some integration tests against an actual database instance.  If you have the cockroachdb binary installed on your PATH,
the test suite will startup a temporary cockroachdb instance on a random port to test against.  It is stopped and the tmp data files are deleted once the test ends.  It will also run the integration tests against database
pointed at by your `SG_POSTGRESQL_TEST_URL` environment variable if it’s set.

Also includes some small formatting changes introduced by `gofmt -w .`
2020-04-18 17:42:17 -04:00
Vikram Rangnekar 7831d27345 Refactor Super Graph into a library #26 2020-04-10 02:27:43 -04:00