Commit graph

959 commits

Author SHA1 Message Date
Tobie Morgan Hitchcock
35047ce04c Improve remote array record fetching 2018-04-22 00:10:51 +01:00
Tobie Morgan Hitchcock
abe117b7d3 Don’t mask the named return values
The defer function is expecting an expression value, not a nil value, and therefore we shouldn’t override the named return values in the function.
2018-04-20 23:49:45 +01:00
Tobie Morgan Hitchcock
fb256df42b Prevent infinite loops with nested subqueries 2018-04-20 23:40:52 +01:00
Tobie Morgan Hitchcock
d2a451345a Don’t alter subquery RETURN type
Don’t alter the RETURN type for CREATE / UPDATE / DELETE / RELATE / INSERT / UPSERT statements. Not only does this cause unexpected behaviour, but it also altered the statement from multiple goroutines, and therefore caused a data race.
2018-04-20 23:35:32 +01:00
Tobie Morgan Hitchcock
7afe14ab1a Add ‘purge’ SQL function 2018-04-20 21:34:54 +01:00
Tobie Morgan Hitchcock
671e59d13f Remove unused ‘binary’ SQL function 2018-04-20 21:33:54 +01:00
Tobie Morgan Hitchcock
459c7264ec Don’t enable array lengths fetch using data paths 2018-04-20 21:33:13 +01:00
Tobie Morgan Hitchcock
8d11027788 Fix bug in downstream cork package
A bug in the cork encoding package prevented encoding of large maps or arrays.
2018-04-20 16:40:40 +01:00
Tobie Morgan Hitchcock
2d17f69a8c Ensure all SQL THINGs are processed correctly from JSON 2018-04-20 12:02:58 +01:00
Tobie Morgan Hitchcock
83edea8a66 Don’t fetch right side of AND / OR statements if not necessary 2018-04-20 00:17:13 +01:00
Tobie Morgan Hitchcock
c4f8448345 Ensure session wide variables are available on a live query context 2018-04-19 13:36:08 +01:00
Tobie Morgan Hitchcock
4d155c61ce Only run events when the document has changed 2018-04-19 13:36:04 +01:00
Tobie Morgan Hitchcock
e8accd1b8e Enable limiting the maximum number of query workers 2018-04-18 15:49:32 +01:00
Tobie Morgan Hitchcock
3bc445ac05 Add tests to ‘ints’ package 2018-04-18 15:49:16 +01:00
Tobie Morgan Hitchcock
07d52831d0 Improve tests for DEFINE EVENT db queries 2018-04-18 15:27:51 +01:00
Tobie Morgan Hitchcock
cf68ebffb1 Improve DB error message types 2018-04-18 15:27:21 +01:00
Tobie Morgan Hitchcock
6fe4db6a58 Check permissions on the initial document when deleting
When deleting a document, we need to check the visibility permissions using the initial document, as the current document will now have been emptied. As a result, no delete notifications were being delivered to LIVE queries.
2018-04-15 01:53:36 +01:00
Tobie Morgan Hitchcock
55ece805e4 Don’t include empty/deleted values from KV storage
When looping over a range of KV items, it should ignore items which have been set to NULL and whose latest version has therefore been deleted.
2018-04-15 01:37:23 +01:00
Tobie Morgan Hitchcock
49ec33987f Update generated code 2018-04-14 21:59:16 +01:00
Tobie Morgan Hitchcock
7602b77c6d Store regex values in special sql.REGEX type 2018-04-14 21:56:29 +01:00
Tobie Morgan Hitchcock
01f1ee9f66 Use default go build and go install commands 2018-04-14 19:25:07 +01:00
Tobie Morgan Hitchcock
dc700c34f6 Update 3rd party package dependencies 2018-04-14 19:24:25 +01:00
Tobie Morgan Hitchcock
bc31140308 Improve live query notification delivery 2018-04-14 19:20:15 +01:00
Tobie Morgan Hitchcock
677767d85b Ensure sockets are deregistered on disconnect 2018-04-14 19:17:07 +01:00
Tobie Morgan Hitchcock
67cfca04b9 Enable permissions on individual document fields 2018-04-14 19:14:47 +01:00
Tobie Morgan Hitchcock
2a74759a71 Enable IF and RUN statements in MultStatements 2018-04-14 18:36:28 +01:00
Tobie Morgan Hitchcock
6354d0ce2a Fix comment typos 2018-04-14 18:02:58 +01:00
Tobie Morgan Hitchcock
ac19b552e5 Add SQL RUN query statement type 2018-04-14 17:55:05 +01:00
Tobie Morgan Hitchcock
ea1749f03f Split DB event processing code into separate file 2018-04-13 21:15:38 +01:00
Tobie Morgan Hitchcock
917dbff89d Add math.fixed function for truncating floats 2018-04-13 20:48:48 +01:00
Tobie Morgan Hitchcock
3f7d7fc863 Add fuzzy string search to conditional SQL clauses 2018-04-13 20:34:52 +01:00
Tobie Morgan Hitchcock
9b4ff941b6 Ensure events are run with DB level permissions 2018-04-10 07:19:22 +01:00
Tobie Morgan Hitchcock
93b11514c5 Move db.yield code into separate file 2018-04-10 07:18:25 +01:00
Tobie Morgan Hitchcock
a86d6a461c Update logrus package name 2018-04-06 09:47:44 +01:00
Tobie Morgan Hitchcock
df049fe8f2 Only output logo if logging in text mode 2018-04-06 09:06:41 +01:00
Tobie Morgan Hitchcock
fd0712398d Enable mysql tls and remove cloudsqlproxy 2018-04-06 01:15:19 +01:00
Tobie Morgan Hitchcock
cc15f9d623 Update 3rd party dependency imports 2018-04-05 23:28:16 +01:00
Tobie Morgan Hitchcock
be832029a7 Remove google and syslog logging 2018-04-05 08:51:44 +01:00
Tobie Morgan Hitchcock
d163db967f Remove 3rd party package for SQL field validation 2018-04-05 00:35:35 +01:00
Tobie Morgan Hitchcock
b988b2c890 Remove ‘url’ and ‘color’ SQL field types 2018-04-05 00:35:08 +01:00
Tobie Morgan Hitchcock
b8972ae2c2 Mathmatical sql functions must be prefixed with ‘math’
All mathmatical functions must now be used by specifying the full function name. For example `avg` is now `math.avg`.
2018-04-05 00:34:09 +01:00
Tobie Morgan Hitchcock
6c3ae600f8 Remove unused snappy compression package 2018-04-04 19:27:46 +01:00
Tobie Morgan Hitchcock
0dc9ad339c Enable multiple expressions with database events
It is now possible to run multiple query expressions when an event on a table has occured. Query expressions can be separated with a semicolon, and will be run in the same transaction as the main query.
2018-04-04 19:20:07 +01:00
Tobie Morgan Hitchcock
86a911b4a8 Improve tests for DB indexes 2018-04-04 19:16:32 +01:00
Tobie Morgan Hitchcock
82ffd9ef31 Fix bug in putC/delC for mysql storage backend
When using encryption, the expected value (once encrypted) would never be the same as the encrypted value in the storage layer. As a result, it would never be possible to putC or delC a KV item.

Now the mysql package first gets the key from the storage layer, and then checks it’s decrypted value, before attempting to overwirte the value in the storage layer.
2018-04-04 19:11:59 +01:00
Tobie Morgan Hitchcock
085ba565b2 The SQL function string.reverse should take 1 argument 2018-04-02 23:44:51 +01:00
Tobie Morgan Hitchcock
7c39c99bf3 Ensure correct index values are inserted 2018-04-01 00:33:51 +01:00
Tobie Morgan Hitchcock
0a85084b8e Use alpine linux for base docker image 2018-03-19 11:47:29 +00:00
Tobie Morgan Hitchcock
160986cc0b Shorten test timeout time to prevent test failure 2018-03-19 11:35:31 +00:00
Tobie Morgan Hitchcock
6d60b2ff4d Use scratch Docker container for surreal build 2018-03-19 11:33:28 +00:00