Commit graph

1125 commits

Author SHA1 Message Date
Tobie Morgan Hitchcock
445436bff7 Ensure ‘warn’ log level works correctly 2018-08-20 01:06:10 +01:00
Tobie Morgan Hitchcock
a3787ad274 Simplify and improve internal SQL AST structures 2018-08-20 00:21:35 +01:00
Tobie Morgan Hitchcock
c7ae796275 SQL statements now run in serial mode by default 2018-08-10 19:16:42 +01:00
Tobie Morgan Hitchcock
e57e90a2f5 Ensure SQL functions return interface{} types 2018-08-08 08:47:41 +01:00
Tobie Morgan Hitchcock
48df950be5 Remove mysql kvs storage backend 2018-08-08 08:21:42 +01:00
Tobie Morgan Hitchcock
2932bac73e Enable subqueries in CREATE / UPDATE / RELATE / DELETE queries 2018-07-17 09:56:31 +01:00
Tobie Morgan Hitchcock
c0f9ec1f26 Implement PARALLEL keyword on queries 2018-07-17 09:35:36 +01:00
Tobie Morgan Hitchcock
8a41cc8a08 Use a fake context when running scope auth queries 2018-07-12 02:50:03 +01:00
Tobie Morgan Hitchcock
0e4557bdd3 Remove unused code 2018-07-12 02:49:35 +01:00
Tobie Morgan Hitchcock
fed44641cc Output interface{} not []float64 2018-07-04 11:40:57 +01:00
Tobie Morgan Hitchcock
d32873839a Ignore db files in git 2018-07-04 11:39:34 +01:00
Tobie Morgan Hitchcock
ba40fd7285 Enable $this parameter in SELECT queries
It is now possible to select yielded output fields in the same query, without needing to use a subquery.
2018-05-31 14:34:39 +01:00
Tobie Morgan Hitchcock
7277e32d88 Fix distinct() with GROUP BY clauses 2018-05-31 14:18:40 +01:00
Tobie Morgan Hitchcock
ddefed03e6 Don’t allow use of $ param with no value in queries
Beforehand it was possible to do  SELECT * FROM $  which would show all of the variables defined. This is now not possible, and variables must be specified using their defined name.
2018-05-30 19:06:48 +01:00
Tobie Morgan Hitchcock
8ab01b510f Remove unused code 2018-05-30 13:25:53 +01:00
Tobie Morgan Hitchcock
ba4f3c7e15 Simplify permissions fetching code 2018-05-30 13:25:42 +01:00
Tobie Morgan Hitchcock
db37b8378b Allow any expression for SELECT VERSION string 2018-05-30 13:25:11 +01:00
Tobie Morgan Hitchcock
7bf408336d Allow expressions in SELECT field AS alias clauses 2018-05-30 13:24:45 +01:00
Tobie Morgan Hitchcock
c89c80f5fb Update 3rd party dependencies
THe github.com/abcum/fibre package now supports ping <-> pong control messages automatically, simplifying the websocket keepalive functionality.
2018-05-16 00:15:52 +01:00
Tobie Morgan Hitchcock
295285707e Don’t use a cookie for unique Session ID 2018-05-14 02:37:49 +01:00
Tobie Morgan Hitchcock
6f02651c4f Ensure correct cookie header even if cookie exists
Previously, if the cookie value was passed to the database from the client, then the client would not set the correct cookie option values, effectively causing the cookie to expire.
2018-05-14 00:15:26 +01:00
Tobie Morgan Hitchcock
68f7ce3851 Fix index diffing algorithm 2018-05-13 22:16:06 +01:00
Tobie Morgan Hitchcock
b886a5576a Return empty array if requested array range
If an array range was requested, but no values matched, then a nil value was returned, instead of an empty array.

Now an empty array is returned if regardless of whether there are any matching array values or not.
2018-05-13 22:15:54 +01:00
Tobie Morgan Hitchcock
74785bd70d Add support for array index ranges in SQL queries 2018-05-13 22:14:19 +01:00
Tobie Morgan Hitchcock
e120f8961c Add server-generated session info to queries 2018-05-12 23:46:01 +01:00
Tobie Morgan Hitchcock
c8980e2eac Remove connection wide variables 2018-05-09 23:09:51 +01:00
Tobie Morgan Hitchcock
0615896c0e Add timeout errors to json output 2018-05-09 22:52:47 +01:00
Tobie Morgan Hitchcock
220d04b696 No need to close the log messages channel
Closing the channel sometimes resulted in writes to a closed channel. Instead, the channel will be cleared up by GC as the socket is removed from the sync.Map anyway.
2018-05-09 16:34:53 +01:00
Tobie Morgan Hitchcock
faf54b053a Add RPC Ping method 2018-05-09 12:13:44 +01:00
Tobie Morgan Hitchcock
5442861cb8 Enable global ENV variable to detect environment 2018-05-09 04:08:04 +01:00
Tobie Morgan Hitchcock
ebd5680b7d Don’t display live queries in SQL INFO statements 2018-05-08 18:53:21 +01:00
Tobie Morgan Hitchcock
82991db7eb Enable s3 and gcs data storage 2018-05-02 12:28:40 +01:00
Tobie Morgan Hitchcock
9983d2aa84 Update 3rd party packages 2018-05-02 12:28:24 +01:00
Tobie Morgan Hitchcock
e3bea0a897 Use context.Context on all kvs requests 2018-05-02 03:05:03 +01:00
Tobie Morgan Hitchcock
b7d89ee65a Add support for foreign tables with group by clauses 2018-05-02 02:43:04 +01:00
Tobie Morgan Hitchcock
7f6d1565ff Enable ability to set a global query timeout duration 2018-05-02 02:42:16 +01:00
Tobie Morgan Hitchcock
9f0ea3ee61 Improve database query logging 2018-05-02 02:32:06 +01:00
Tobie Morgan Hitchcock
f1fa311d3b Specify connection limits for mysql kv store backend 2018-05-01 23:08:15 +01:00
Tobie Morgan Hitchcock
47e1a4aceb Fix a bug with virtual records in scoped queries
When querying a virtual document, it would check that the scope had permission to view the record, even though the record did not actually belong to a table.

Not it checks to see if the record is a virtual in-memory record, and does not perform any permissions checks if this is the case.
2018-05-01 13:17:10 +01:00
Tobie Morgan Hitchcock
efaccb8afa Add math.min() and math.max() to rolling functions 2018-04-29 14:43:12 +01:00
Tobie Morgan Hitchcock
05f8b6ad6b Fix bug in math.spread() SQL function 2018-04-29 14:42:49 +01:00
Tobie Morgan Hitchcock
86b81c469e Add math.nearestrank() SQL function 2018-04-29 14:42:35 +01:00
Tobie Morgan Hitchcock
2878b29dde Add math.sqrt SQL function 2018-04-29 14:02:19 +01:00
Tobie Morgan Hitchcock
0c5af3ec29 the SQL distinct() function always returns a slice 2018-04-29 01:10:39 +01:00
Tobie Morgan Hitchcock
f5a0739985 Add foreign table information to SQL INFO query 2018-04-28 22:08:34 +01:00
Tobie Morgan Hitchcock
ec8ece9878 Remove for loop from mutex 2018-04-28 22:08:19 +01:00
Tobie Morgan Hitchcock
f335d71aba Move to channel based mutex 2018-04-28 20:35:20 +01:00
Tobie Morgan Hitchcock
99d050b238 Ensure linked records are fetched using the same query version 2018-04-28 20:35:19 +01:00
Tobie Morgan Hitchcock
14c0d93635 Ensure arrays and objects are always set 2018-04-27 15:23:58 +01:00
Tobie Morgan Hitchcock
ec6a44f2d6 Regenerate codec files 2018-04-27 00:46:43 +01:00