Commit graph

220 commits

Author SHA1 Message Date
Tobie Morgan Hitchcock
6e8fdaa2db Ensure nil fields are removed when SCHEMAFULL 2017-12-05 11:09:04 +00:00
Tobie Morgan Hitchcock
14d3539dbf Add SQL functions for parsing urls 2017-12-04 10:06:01 +00:00
Tobie Morgan Hitchcock
82df9dca86 Fix typo in comment 2017-12-03 00:44:07 +00:00
Tobie Morgan Hitchcock
001d7f866c Prevent datarace, by not using global variable when decoding
Don’t use the global variable ‘skip’ to decode into, as this causes a data race, when decoding keys from inside multiple different goroutines. Instead we now create a new string variable for every decode function, which will be created on the heap and ignored when the function returns.
2017-12-01 00:34:44 +00:00
Tobie Morgan Hitchcock
63f2791494 Remove the need for the ‘unsafe’ package when encoding keys 2017-11-30 00:59:10 +00:00
Tobie Morgan Hitchcock
eb7a9c2744 Add ability to retrieve different values
It is now possible to specify a function to manipulate each values stored in a data object, when retrieving that value. This enables storing compressed obejcts as strings, which are expanded when accessed. This is used to store *sql.Thing values, which when requested can access embedded fields by fetching and returning the full record when the *sql.Thing is requested.
2017-11-28 00:39:00 +00:00
Tobie Morgan Hitchcock
287951a37f Ensure we trim all data path parts before fetching values 2017-11-27 18:30:20 +00:00
Tobie Morgan Hitchcock
93d154a099 Add sql functions for generating GUIDs 2017-11-27 11:35:26 +00:00
Tobie Morgan Hitchcock
7fbc9feff9 Simplify uuid util package 2017-11-27 11:34:59 +00:00
Tobie Morgan Hitchcock
0762ee25b2 Use XIDs instead of UUIDs for record IDs 2017-11-26 16:54:49 +00:00
Tobie Morgan Hitchcock
527f85f8e6 Implement both JsonMarshaler and JsonUnmarshaler
If a type only defines one-half of the symmetry (e.g. it implements MarshalJSON() but not UnmarshalJSON() ), then that type doesn't satisfy the codec encoding/decoding check and instead codec will not encode or decode the item using the special interface methods.
2017-11-24 10:55:13 +00:00
Tobie Morgan Hitchcock
43d841dacc Full update of the DB package 2017-11-16 20:53:39 +00:00
Tobie Morgan Hitchcock
08cf03f98b Add ‘fncs’ package for all sql function commands 2017-11-16 20:31:20 +00:00
Tobie Morgan Hitchcock
af00a45721 Add initial ‘geof’ package for geospatial functions 2017-11-16 20:30:56 +00:00
Tobie Morgan Hitchcock
096984ad05 Improve ‘conv’ package for converting values to specific data types 2017-11-16 20:30:27 +00:00
Tobie Morgan Hitchcock
e300e9c423 Improve efficiency of database key encoding and decoding
Make use of the github.com/abcum/bump package to efficiently encode and decode from and to byte slices, whilst at the same time using encoder and decoder pools, instead of creating a new buffer for each encoding / decoding process.
2017-11-16 20:18:42 +00:00
Tobie Morgan Hitchcock
61015c8f7a Add database key for FT foreign tables 2017-11-16 20:16:52 +00:00
Tobie Morgan Hitchcock
8ffdaa6d77 Add database key for EV table events 2017-11-16 20:16:52 +00:00
Tobie Morgan Hitchcock
21cb197d5a Make sure LV database key specifies a table 2017-11-16 20:16:52 +00:00
Tobie Morgan Hitchcock
6a1ec1b2bb Remove unused VW database key 2017-11-16 20:16:52 +00:00
Tobie Morgan Hitchcock
81497e941d Add Copy() method to all keys for efficiently duplicating a key 2017-11-16 20:16:51 +00:00
Tobie Morgan Hitchcock
b957202ee5 Remove unused CK database key 2017-11-16 20:16:24 +00:00
Tobie Morgan Hitchcock
0ce8e78577 Make use of direct byte encoding / decoding
With the lates github.com/abcum/cork package, it is now possible to encode and decode a cork data stream without creating a new buffer each time. Instead the github.com/abcum/bump pacakge efficiently buffers the byte slice without any unnecessary allocations.
2017-11-16 19:54:55 +00:00
Tobie Morgan Hitchcock
44591abfe5 Add ‘hook’ package for retryable functions
The hook package enables static and backoff retryable functions. This package can be used for calling remote webhooks concurrently in separate goroutines.
2017-11-16 19:54:55 +00:00
Tobie Morgan Hitchcock
12c2ada091 Improve error messages on REST API queries 2017-11-16 19:54:55 +00:00
Tobie Morgan Hitchcock
121498e95e Add ‘math’ package for all mathematical functions 2017-11-16 19:54:55 +00:00
Tobie Morgan Hitchcock
34a4132403 Add ‘ints’ package for returning bounded number values from arguments 2017-11-16 19:54:54 +00:00
Tobie Morgan Hitchcock
62284f0300 Add text package for specific functions on text strings 2017-11-16 19:54:54 +00:00
Tobie Morgan Hitchcock
c2135b1494 Add rand package for generation of random numbers 2017-11-16 19:54:54 +00:00
Tobie Morgan Hitchcock
e9bde01cb1 Put index diffing code into a separate package 2017-11-16 19:54:54 +00:00
Tobie Morgan Hitchcock
e8f17b1602 Add ‘comp’ package for comparing ordering of data types 2017-11-16 19:54:54 +00:00
Tobie Morgan Hitchcock
428ad4312c Add an Append function which appends to a slice 2017-11-16 19:54:54 +00:00
Tobie Morgan Hitchcock
4640839231 Use switch statements instead of if statements 2017-11-16 19:54:54 +00:00
Tobie Morgan Hitchcock
d66e3d5866 When resetting a doc, reset it to an empty map 2017-11-16 19:54:54 +00:00
Tobie Morgan Hitchcock
3f68f1318c Copy should return a new document, not interface{} 2017-11-16 19:54:54 +00:00
Tobie Morgan Hitchcock
33391e0a28 Improve and fix diff package 2017-11-16 19:54:54 +00:00
Tobie Morgan Hitchcock
8ed69a8774 Add library for generating fake data 2017-06-09 18:59:03 +01:00
Tobie Morgan Hitchcock
f7318dbbe8 Fix godoc comment 2017-06-09 18:57:16 +01:00
Tobie Morgan Hitchcock
54dd56cbd5 Use cork encoder/decoder pools 2017-05-05 16:22:11 +01:00
Tobie Morgan Hitchcock
6bfb30a3b4 Add package for formatting floats with certain decimal precision 2017-04-28 17:06:19 +01:00
Tobie Morgan Hitchcock
6f9cac13f3 No need for a buffer to decode CORK objects 2017-04-28 17:04:47 +01:00
Tobie Morgan Hitchcock
862df0c9e3 Improve diff package efficiency 2017-04-28 17:03:47 +01:00
Tobie Morgan Hitchcock
1e5c90b3d7 Move lua2go conversion code to separate package 2017-04-28 17:03:35 +01:00
Tobie Morgan Hitchcock
2d5151c8ba Enable SQL AST string formatting 2017-03-02 10:47:10 +00:00
Tobie Morgan Hitchcock
5fffc4bb73 Diff records with new diff package 2017-02-28 10:46:06 +00:00
Tobie Morgan Hitchcock
e97cac18e8 Don’t remove meta information from records 2017-02-28 10:45:40 +00:00
Tobie Morgan Hitchcock
ca6d0d86fd Fix bug when deleting range queries
When performing a range query on an array when deleting, the items which were supposed to be removed, ended up being the ones which were kept.

Not the ramining array items are kept instead when deleting.
2017-02-23 15:43:17 +00:00
Tobie Morgan Hitchcock
a49bbd74c7 Enable REST output as JSON and JSONAPI 2017-02-20 10:38:20 +00:00
Tobie Morgan Hitchcock
ff0acf5041 Add inflection package 2017-02-20 10:26:26 +00:00
Tobie Morgan Hitchcock
969179660b Enable data docs to self encode to JSON 2017-02-20 09:46:26 +00:00
Tobie Morgan Hitchcock
83a64c6c29 Enforce default RETURN value in sql parser 2017-02-20 01:44:12 +00:00
Tobie Morgan Hitchcock
f56196a150 Update keys package 2017-02-09 20:35:19 +00:00
Tobie Morgan Hitchcock
1b83dace69 Add JSON Patch go package 2017-02-07 17:23:12 +00:00
Tobie Morgan Hitchcock
955e736a4d Enable expressive array item selection using [:] 2017-02-07 17:22:57 +00:00
Tobie Morgan Hitchcock
664ab1054c Add Diff method for comparing data docs 2017-02-04 11:23:30 +00:00
Tobie Morgan Hitchcock
e6df3dbeb9 Add Each method
Add Each method for iterating through all of the values in a document. This is in contrast to Walk which will iterate over a given path regardless of whether it exists or not.
2017-02-04 11:22:53 +00:00
Tobie Morgan Hitchcock
865a0b16a3 Improve path parsing enabling [] array characters 2017-02-04 11:13:11 +00:00
Tobie Morgan Hitchcock
db2fb6159c Specify struct fields on struct initialisation 2017-02-04 11:00:13 +00:00
Tobie Morgan Hitchcock
15cb9f7b96 Remove old diffing package 2017-02-03 19:01:57 +00:00
Tobie Morgan Hitchcock
ac95aa1bcd Remove javascript language runtime 2017-02-02 00:07:45 +00:00
Tobie Morgan Hitchcock
68c22bc25c Add subqueries, subexpressions, and paths to SQL 2016-11-04 09:58: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
bb6387c69b Add invisible meta object on items 2016-10-29 12:46:22 +01:00
Tobie Morgan Hitchcock
8eaa4e6eda User lowercase json keys for before+after 2016-10-29 12:45:02 +01:00
Tobie Morgan Hitchcock
c08e9d69c9 Use actual @things not strings for item ids 2016-10-29 12:44:49 +01:00
Tobie Morgan Hitchcock
d37862e385 Add conditional checking for @things 2016-10-29 12:44:00 +01:00
Tobie Morgan Hitchcock
174cc8bcad Add SQL LET statements with bound parameters 2016-10-29 12:28:20 +01:00
Tobie Morgan Hitchcock
0af761d2db Improve embedded field checking and defaults 2016-10-24 17:03:28 +01:00
Tobie Morgan Hitchcock
6bf826c466 Enable path walking with a callback function 2016-10-24 14:16:53 +01:00
Tobie Morgan Hitchcock
fd540a5237 Enable checking for existing and non-null items 2016-10-24 14:16:42 +01:00
Tobie Morgan Hitchcock
99d9657d80 Enable getting array items directly 2016-10-24 14:16:14 +01:00
Tobie Morgan Hitchcock
4c8d5213dc Add double FIELD TYPE and improve type checking 2016-10-20 14:14:10 +01:00
Tobie Morgan Hitchcock
8991586a0b Add basic JSON DPM package (ROUGH) 2016-10-14 23:02:01 +01:00
Tobie Morgan Hitchcock
fd0ce5ea71 Improve item package 2016-10-14 23:01:44 +01:00
Tobie Morgan Hitchcock
27b975fb71 Remove custom code from rules checker 2016-10-14 22:57:26 +01:00
Tobie Morgan Hitchcock
91b3b83554 Add key for SCL SCOPE queries 2016-10-14 21:26:49 +01:00
Tobie Morgan Hitchcock
d578715d01 Add key for SQL LIVE queries 2016-10-14 21:26:39 +01:00
Tobie Morgan Hitchcock
8791fb4cfd Improve code comments 2016-10-14 21:26:26 +01:00
Tobie Morgan Hitchcock
58b9cf3478 Use go fmt simplify 2016-10-14 07:52:33 +01:00
Tobie Morgan Hitchcock
f90554c0b5 Ensure methods are not exported 2016-10-14 07:52:00 +01:00
Tobie Morgan Hitchcock
cae06f2b4b Remove GOB serialization code 2016-10-14 07:14:58 +01:00
Tobie Morgan Hitchcock
40a52dfbf1 Enable sorting of negative numbers and floats 2016-10-14 07:14:34 +01:00
Tobie Morgan Hitchcock
fdb639e517 Simplify variables 2016-10-14 07:14:05 +01:00
Tobie Morgan Hitchcock
dd79f3c440 Remove SQL RECORD statement 2016-10-07 14:21:01 +01:00
Tobie Morgan Hitchcock
c06f111580 Remove unused codec interface file 2016-10-02 11:36:14 +01:00
Tobie Morgan Hitchcock
25c86a49da Use cork serialization for data storage 2016-10-02 00:17:19 +01:00
Tobie Morgan Hitchcock
1fd0ddafe4 Fix godoc comments 2016-09-28 12:33:07 +01:00
Tobie Morgan Hitchcock
701125b879 No need for ability to export as JSON 2016-09-28 12:32:41 +01:00
Tobie Morgan Hitchcock
66f09db9f5 Add SQL VIEWs 2016-09-21 00:36:37 +01:00
Tobie Morgan Hitchcock
94c0f32ae4 Add specific GOB encoding methods 2016-09-19 14:44:56 +01:00
Tobie Morgan Hitchcock
93da1d16f3 No need for canonical encoding for storage 2016-09-19 12:03:03 +01:00
Tobie Morgan Hitchcock
aa4f788566 Use generic pack.Encode + pack.Decode methods 2016-09-19 12:02:42 +01:00
Tobie Morgan Hitchcock
486b666132 Simplify encoding of basic structs 2016-09-16 09:49:02 +01:00
Tobie Morgan Hitchcock
ed474b8415 Simplify item ids 2016-09-14 22:28:00 +01:00
Tobie Morgan Hitchcock
dc3793d03d Use BINC encoding instead of MsgPACK for storage 2016-09-14 22:26:41 +01:00
Tobie Morgan Hitchcock
218ce8ad82 Simplify pack data encode/decode package 2016-09-14 22:25:18 +01:00
Tobie Morgan Hitchcock
fbc94f90e5 Pass old and new item data to rules checking code 2016-09-14 22:24:22 +01:00
Tobie Morgan Hitchcock
19d7c2a14e Don’t embed document data 2016-09-14 21:46:23 +01:00
Tobie Morgan Hitchcock
ed6a9555a1 Return an error when data is corrupt 2016-09-14 17:02:48 +01:00