Commit graph

1312 commits

Author SHA1 Message Date
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
Tobie Morgan Hitchcock
13e89972fa Don’t do race detection testing in CI environment 2018-03-19 11:32:38 +00:00
Tobie Morgan Hitchcock
a21e3daa0b Enable race detection testing in CI environment 2018-03-19 09:05:23 +00:00
Tobie Morgan Hitchcock
b4a8f10cdc Ensure query variables are consistent
All request variables which are assigned to an sql query are now specified in one location, ensuring that they are consistent and always present for all queries.
2018-03-18 21:38:21 +00:00
Tobie Morgan Hitchcock
ad4adbd986 Enable select * data from a foreign thing / record 2018-03-18 21:33:26 +00:00
Tobie Morgan Hitchcock
ca392f87a7 Add ON SIGNUP and ON SIGNIN events to SQL SCOPE
It is now possible to run queries when a user signs-up or signs-in, by specifying multiple queries within an ON SIGNUP (…) clause, or a ON SIGNIN (...) clause.
2018-03-18 21:30:02 +00:00
Tobie Morgan Hitchcock
0dae9d2366 Add sql.MultExpression type 2018-03-18 21:01:29 +00:00
Tobie Morgan Hitchcock
f77daca0da Simplify subquery parsing 2018-03-18 20:01:41 +00:00
Tobie Morgan Hitchcock
3436634586 Add SQL either function for simplified IF ELSE clauses 2018-03-18 19:03:14 +00:00
Tobie Morgan Hitchcock
cc85b86ced Fix incorrect fmt.Sprintf input arguments 2018-03-18 18:58:30 +00:00
Tobie Morgan Hitchcock
d70d063797 Make JWT token values available to scope CONNECT query 2018-03-02 11:03:19 +00:00
Tobie Morgan Hitchcock
aebc001229 Store IP address in JWT token 2018-03-02 11:02:47 +00:00
Tobie Morgan Hitchcock
069baf71b7 Empty strings now match an EMPTY sql clause 2018-02-17 09:23:51 +00:00
Tobie Morgan Hitchcock
bece5d1f07 Ensure we run signUp not signIn when signing up 2018-02-17 09:14:26 +00:00
Tobie Morgan Hitchcock
87cf68b213 Don’t log context auth data 2018-02-14 15:48:55 +00:00
Tobie Morgan Hitchcock
b4dfaf2898 Don’t assert the value of a field type
Previously if a field had a type, and a value was entered which did not match that type, then an error was raised, even though the ASSERT clause was not set. Now the field will be set to nil if the field does not match the specified type, and the ASSERT clause can be used to ensure that a valid value is always entered.
2018-02-14 15:48:42 +00:00
Tobie Morgan Hitchcock
2249086887 Improve rpc authentication methods 2018-02-14 13:19:43 +00:00
Tobie Morgan Hitchcock
c47fe55ffb Ensure any previous auth data is reset if authentication fails 2018-02-14 13:17:05 +00:00
Tobie Morgan Hitchcock
31c7849643 No need to cast, incase the value is not set on the context 2018-02-14 13:15:56 +00:00
Tobie Morgan Hitchcock
76837325d0 Update 3rd party dependencies 2018-02-12 22:26:17 +00:00
Tobie Morgan Hitchcock
e073bf2775 Enable persistent request variables
It is now possible to set a variable on a connection, and use that variable in multiple subsequent queries. This ensures that websockets can make use of state variables for detecting logged-in, and non-logged-in clients.
2018-02-12 22:13:36 +00:00
Tobie Morgan Hitchcock
15e9f77434 Add Uniq() rpc method for crypto-secure rando ids 2018-02-12 21:50:19 +00:00
Tobie Morgan Hitchcock
779251bc54 Simplify auth data response on rpc requests
Ther is no need to return all auth data when caling the Info() and Auth(token) rpc functions. Instead only the id needs to be returned to the consuming application.
2018-02-12 21:48:55 +00:00
Tobie Morgan Hitchcock
1dba4e4c89 Add string genrator function to util/rand package 2018-02-12 21:38:08 +00:00
Tobie Morgan Hitchcock
926ef37234 LET and RETURN should not need SC level permissions 2018-02-12 15:38:34 +00:00
Tobie Morgan Hitchcock
9b0ef8d6d7 When clearing an index, remove all items 2018-02-12 09:05:52 +00:00
Tobie Morgan Hitchcock
bb8c623f88 Don’t use readonly transactions for mysql 2018-02-11 16:43:59 +00:00
Tobie Morgan Hitchcock
5c18ee20a7 Log errors which occur on the kvs layer 2018-02-11 16:43:49 +00:00
Tobie Morgan Hitchcock
8b508b09c6 Don’t use non-default isolation level for mysql 2018-02-11 16:14:42 +00:00
Tobie Morgan Hitchcock
3194253b71 Update 3rd party dependencies 2018-02-11 09:40:15 +00:00
Tobie Morgan Hitchcock
02ef06a1d2 Increase the limit when fetching batch items from the kvs 2018-02-11 00:17:16 +00:00
Tobie Morgan Hitchcock
ccf57df085 Add support for mysql as a backend kv store 2018-02-11 00:16:28 +00:00
Tobie Morgan Hitchcock
84b72e25d2 Don’t use of ClrL, GetL, DelL, PutL methods on KV store
Remove the need to query a particular KV level, and instead use slightly different encoded keys, and use prefix based iteration. This means we can use different KV stores to give the same functionality, without needing to use hierarchical KV stores.
2018-02-09 15:08:27 +00:00
Tobie Morgan Hitchcock
8cce4ad185 No need for PutC as we always already have the record value
We don’t need to check whether the record already exists, as we always have any record contents when we are procesing a document. Therefore we already know if a document exists or not in the kv store.
2018-02-08 10:59:54 +00:00
Tobie Morgan Hitchcock
dc6a357e26 Enable passing context when beginning a transaction 2018-02-06 17:07:42 +00:00
Tobie Morgan Hitchcock
788d19c498 Fix godoc comments 2018-02-06 17:05:26 +00:00
Tobie Morgan Hitchcock
36e7d8ed3a Flush websocket notifications correctly
Websocket notifications were cleared/flushed regardless of whether individual statements were successful or not.

Now notifications are shifted onto the stack, or removed if the statement is unsuccessful. Once the full query has been processed, all pending notifications are flushed to all websockets (ignoring the current connection frin which th query originated).
2018-01-31 09:15:29 +00:00
Tobie Morgan Hitchcock
a9883efc4a Improve error messages on authentication failure 2018-01-31 08:52:21 +00:00
Tobie Morgan Hitchcock
58b8b461e3 Enable specifying NS, DB, and auth through websocket protocols 2018-01-31 08:52:11 +00:00
Tobie Morgan Hitchcock
7a3355bff0 Enable customisable file size policies for storage backends 2018-01-12 11:10:11 +00:00
Tobie Morgan Hitchcock
afac8b405f Update 3rd party dependencies 2018-01-12 10:55:14 +00:00
Tobie Morgan Hitchcock
19604e589b Buffer changes if data storage layer is shrinking 2018-01-11 15:14:50 +00:00
Tobie Morgan Hitchcock
a52458a26f Update 3rd party dependencies 2018-01-11 15:14:19 +00:00
Tobie Morgan Hitchcock
62a1a38449 Add cli option to specify db shrink policy 2018-01-11 14:57:10 +00:00
Tobie Morgan Hitchcock
d0d1316449 Add test for parsing times and records within json 2018-01-10 14:54:09 +00:00
Tobie Morgan Hitchcock
2f23e84877 Parse times and records within json content 2018-01-10 13:17:50 +00:00
Tobie Morgan Hitchcock
b54e551353 No need to pass sql.parser into sql.scanner 2018-01-10 13:07:09 +00:00
Tobie Morgan Hitchcock
558eba3797 Update 3rd party dependencies 2018-01-10 11:46:30 +00:00