Commit graph

611 commits

Author SHA1 Message Date
Tobie Morgan Hitchcock
efa641e175 Fix pgsql backend connection issues 2016-11-17 13:55:54 +00:00
Tobie Morgan Hitchcock
3ef9eef887 No need for global authentication token
Each namespace/database has it’s own jwt signing authentication token, so a global token for the whole of the database is now unecessary.
2016-11-17 08:47:46 +00:00
Tobie Morgan Hitchcock
ee6653c289 Improve SQL DEFINE SCOPE statement 2016-11-16 22:47:43 +00:00
Tobie Morgan Hitchcock
cf79487b81 Add SQL DEFINE TOKEN statement 2016-11-16 22:47:23 +00:00
Tobie Morgan Hitchcock
a66c604c2f Add SQL DEFINE LOGIN statement 2016-11-16 22:46:57 +00:00
Tobie Morgan Hitchcock
d30975d549 Save with go fmt simplified 2016-11-16 17:31:25 +00:00
Tobie Morgan Hitchcock
97f3262faf Remove unused middleware plugin 2016-11-15 20:05:29 +00:00
Tobie Morgan Hitchcock
2a10913b06 Change name of authentication scope level 2016-11-14 13:26:07 +00:00
Tobie Morgan Hitchcock
e66435258e Ensure auth is checked after all other middleware 2016-11-14 13:24:48 +00:00
Tobie Morgan Hitchcock
cd20e647a0 No need to check auth level when choosing NS/DB 2016-11-14 13:23:34 +00:00
Tobie Morgan Hitchcock
63e516b63f Add method for parsing json object directly 2016-11-14 13:22:43 +00:00
Tobie Morgan Hitchcock
cd44c77de6 Improve error message when unable to select NS/DB 2016-11-14 10:20:45 +00:00
Tobie Morgan Hitchcock
3038b6adec Rename file 2016-11-13 19:21:34 +00:00
Tobie Morgan Hitchcock
45b06dfd9b Remove unused SQL tokens 2016-11-10 12:36:01 +00:00
Tobie Morgan Hitchcock
4f04721b31 Enable times as basic LET variables and set immediately 2016-11-09 15:18:11 +00:00
Tobie Morgan Hitchcock
0292140d3c Enable NOW keyword as shortcut for now() in SQL 2016-11-09 15:16:09 +00:00
Tobie Morgan Hitchcock
b0f8ed6b56 Improving parsing of time durations.
Previously, the number 0 was parsed as 0ns.

In addition, it is now not possible to have duration values defined as strings (inside “” or ‘’).

However, now values are explicitly marked as a duration only if they have a valid DURATION suffix. Anlything else is either a NUMBER of an IDENT.
2016-11-09 15:15:09 +00:00
Tobie Morgan Hitchcock
fdbf38f833 Enable parameters in @thing:id in sql parser 2016-11-05 14:10:59 +00:00
Tobie Morgan Hitchcock
c53efdb06f Define basic parameters immediately 2016-11-05 14:00:15 +00:00
Tobie Morgan Hitchcock
85fcdccab5 Ensure maps are initialised before parsing sql 2016-11-05 13:59:39 +00:00
Tobie Morgan Hitchcock
4452339bd1 Improve authentication blueprint 2016-11-04 15:20:31 +00:00
Tobie Morgan Hitchcock
b2d9873d32 Remove unused specification doc [ci skip] 2016-11-04 12:18:46 +00:00
Tobie Morgan Hitchcock
77aa2adaf7 Update SQL tests 2016-11-04 12:15:51 +00:00
Tobie Morgan Hitchcock
3016dfae99 This should never have been here in the first place 2016-11-04 11:49:50 +00:00
Tobie Morgan Hitchcock
54ad8a16d9 Add codec code generation 2016-11-04 11:45:38 +00:00
Tobie Morgan Hitchcock
2e94c2fe02 Add AND UPSERT to UPDATE statement 2016-11-04 11:43:59 +00:00
Tobie Morgan Hitchcock
61e884c529 Add AND EXPUNGE to DELETE statement 2016-11-04 11:43:32 +00:00
Tobie Morgan Hitchcock
5be23f0167 Update 3rd party dependencies 2016-11-04 11:38:22 +00:00
Tobie Morgan Hitchcock
eb90f2a1b7 Update code comment 2016-11-04 11:34:48 +00:00
Tobie Morgan Hitchcock
b9327723f8 Add SQL command for DEFINE/REMOVE DATABASE 2016-11-04 11:34:37 +00:00
Tobie Morgan Hitchcock
15103e202b Add SQL command for DEFINE/REMOVE NAMESPACE 2016-11-04 11:33:57 +00:00
Tobie Morgan Hitchcock
b720213bd4 Perform authentication access checks in SQL layer 2016-11-04 11:25:53 +00:00
Tobie Morgan Hitchcock
df7ee71cf6 Remove unused import + export routes 2016-11-04 11:25:00 +00:00
Tobie Morgan Hitchcock
9b25a75a36 Don’t pass in surreal conf options to fibre server 2016-11-04 11:24:46 +00:00
Tobie Morgan Hitchcock
ee2f34bef0 Add simple authentication blueprint to extend further 2016-11-04 11:23:52 +00:00
Tobie Morgan Hitchcock
defe873d7d Add back in field parsing expressions 2016-11-04 11:17:11 +00:00
Tobie Morgan Hitchcock
57f49576db Serialize and deserialize Tokens as strings 2016-11-04 11:16:41 +00:00
Tobie Morgan Hitchcock
b0ab86c4ef Add KV, NS, DB to LET and RETURN SQL ASTs
All queries which manipulate the data layer in any way, should at least store the authenticated/selected NS and DB options, even if they do not actually use them when running the SQL statement.
2016-11-04 11:15:05 +00:00
Tobie Morgan Hitchcock
d8a2d40d34 Update SQL tests 2016-11-04 11:13:34 +00:00
Tobie Morgan Hitchcock
b5c8b21eb6 Enable durations to be specified without “” marks 2016-11-04 10:04:55 +00:00
Tobie Morgan Hitchcock
4d9f9b297e Fix single line comment bug
Comments which were on the last line of an SQL query would cause the scanner to never reach the end of the reader stream, hangining indefinitely.

This fix ensures that the single line comment is ended when an EOF is reached.
2016-11-04 10:04:31 +00:00
Tobie Morgan Hitchcock
6e4a229a96 Add && + || as alternatives for AND + OR in SQL 2016-11-04 10:03:07 +00:00
Tobie Morgan Hitchcock
e0bcd5ff37 No need to create extra variable 2016-11-04 10:02:00 +00:00
Tobie Morgan Hitchcock
b5da299ea3 Add CORK self encoding to SQL objects 2016-11-04 10:01:32 +00:00
Tobie Morgan Hitchcock
68c22bc25c Add subqueries, subexpressions, and paths to SQL 2016-11-04 09:58:11 +00:00
Tobie Morgan Hitchcock
28d1806785 Simplify JSON expression parsing 2016-11-04 09:45:11 +00:00
Tobie Morgan Hitchcock
28c70a792a Fix typo 2016-11-04 09:42:12 +00:00
Tobie Morgan Hitchcock
45be69637e Add ‘record’ as a field type 2016-11-04 09:42:00 +00:00
Tobie Morgan Hitchcock
1733f84070 Enable main SQL commands to be within subqueries 2016-11-03 17:20:18 +00:00
Tobie Morgan Hitchcock
dd21b8879a Only do function argument checking in sql parser 2016-11-03 17:16:08 +00:00