Commit Graph

19 Commits

Author SHA1 Message Date
Vikram Rangnekar dd4accfdd2 fix: implement various deepsource suggestions 2020-06-15 10:16:47 -04:00
Vikram Rangnekar 7b5548a2c6 fix: jit failing on anon queries 2020-06-10 00:38:46 -04:00
Vikram Rangnekar 00cfa251a2 fix: issue with jit performance 2020-06-09 19:06:16 -04:00
Vikram Rangnekar b26cdbf960 fix: update allow list parser to support fragments 2020-06-07 13:02:57 -04:00
Vikram Rangnekar bd157290f6 fix: bug with parsing variables in roles_query 2020-06-04 21:55:52 -04:00
Vikram Rangnekar 82cc712a93 fix: bug with shared pointer in new jit mode 2020-06-03 18:19:07 -04:00
Vikram Rangnekar 1a15e433ba feat: make query preperation a JIT operation to improve startup time 2020-06-03 01:03:12 -04:00
Vikram Rangnekar 816121fbcf fix: issue with early return in prepare statement function 2020-05-31 18:10:50 -04:00
Vikram 6102f1d66e fix: infinite loop on missing allow.list issue 2020-05-30 23:36:44 -07: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 31afdac3af docs: add telemetry docs 2020-05-24 10:44:00 -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 842252f9e2 fix: fix issue with skipping prepared statements for some roles on error 2020-05-03 20:52:26 -04:00
Vikram Rangnekar 279f5616d1 fix: fix for issues reported by deepsource 2020-05-03 16:08:34 -04:00
Vikram Rangnekar 6f18d56ca0 fix: update queries generate invalid sql 2020-04-19 13:40:14 -04:00
Vikram Rangnekar c400461835 fix: prepared statements not working in prod mode 2020-04-19 12:54:37 -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 a266517d17 Remove config package 2020-04-11 02:45:06 -04:00
Vikram Rangnekar 7831d27345 Refactor Super Graph into a library #26 2020-04-10 02:27:43 -04:00