Skip to content

Commit db9356e

Browse files
committed
#108 - fixed. #66 - done.
1 parent c3d825c commit db9356e

16 files changed

+936
-102
lines changed

Diff for: README.md

+57
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,8 @@ https://hub.docker.com/r/tarantool/tarantool
7575
* [tnt_select_limit_max](#tnt_select_limit_max)
7676
* [tnt_allowed_spaces](#tnt_allowed_spaces)
7777
* [tnt_allowed_indexes](#tnt_allowed_indexes)
78+
* [tnt_update](#tnt_update)
79+
* [tnt_upsert](#tnt_upsert)
7880
* [Performance tuning](#performance-tuning)
7981
* [Examples](#examples)
8082
* [Copyright & license](#copyright--license)
@@ -904,22 +906,45 @@ A good example is:
904906
HTTP GET ... /url?space_id=512&value=some+string
905907
it could be matched by using the following format 'space_id=%%space_id,value=%s'
906908
```
909+
Also this works with HTTP forms, i.e. HTTP POST, HTTP PUT and so on.
907910

908911
Here is a full list of {FMT_TYPE} types:
909912

910913
```
914+
TUPLES
915+
911916
%n - int64
912917
%f - float
913918
%d - double
914919
%s - string
915920
%b - boolean
921+
922+
Special types
923+
916924
%%space_id - space_id
917925
%%idx_id - index_id
918926
%%off - [select](#tnt_select) offset
919927
%%lim - [select](#tnt_select) limit
920928
%%it - [select](#tnt_select) iterator type, allowed values are:
921929
eq,req,all,lt,le,ge,gt,all_set,any_set,
922930
all_non_set,overlaps,neighbor
931+
932+
KEYS (for UPDATE)
933+
934+
%kn - int64
935+
%kf - float
936+
%kd - double
937+
%ks - string
938+
%kb - boolean
939+
940+
Operations (for UPSERT)
941+
942+
%on - int64
943+
%of - float
944+
%od - double
945+
%os - string
946+
%ob - boolean
947+
923948
```
924949

925950
Examples can be found at:
@@ -1059,6 +1084,38 @@ This directive works like [tnt_allowed_spaces], but for indexes.
10591084

10601085
[Back to contents](#contents)
10611086

1087+
tnt_update
1088+
----------
1089+
**syntax:** *tnt_update [SIZE or off] [KEYS] [FMT]*
1090+
1091+
**default:** *None*
1092+
1093+
**context:** *location, location if*
1094+
1095+
This directive allows executing an update query with Tarantool.
1096+
1097+
* The first argument is a space id.
1098+
* The second argument is a [KEYS (for UPDATE)](#format) string.
1099+
* The third argument is a [format](#format) string.
1100+
1101+
[Back to contents](#contents)
1102+
1103+
tnt_upsert
1104+
----------
1105+
**syntax:** *tnt_upsert [SIZE or off] [FMT] [OPERATIONS]*
1106+
1107+
**default:** *None*
1108+
1109+
**context:** *location, location if*
1110+
1111+
This directive allows executing an upsert query with Tarantool.
1112+
1113+
* The first argument is a space id.
1114+
* The second argument is a [format](#format) string.
1115+
* The third argument is a [OPERATIONS (for UPSERT)](#format) string.
1116+
1117+
[Back to contents](#contents)
1118+
10621119
## Examples
10631120
-----------
10641121

Diff for: src/debug.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2828
* SUCH DAMAGE.
2929
*
30-
* Copyright (C) 2015-2017 Tarantool AUTHORS:
30+
* Copyright (C) 2015-2018 Tarantool AUTHORS:
3131
* please see AUTHORS file.
3232
*/
3333

Diff for: src/json_encoders.c

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/*
23
* Redistribution and use in source and binary forms, with or
34
* without modification, are permitted provided that the following
@@ -26,7 +27,7 @@
2627
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2728
* SUCH DAMAGE.
2829
*
29-
* Copyright (C) 2016 Tarantool AUTHORS:
30+
* Copyright (C) 2016 - 2018 Tarantool AUTHORS:
3031
* please see AUTHORS file.
3132
*/
3233

Diff for: src/json_encoders.h

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
/*
23
* Redistribution and use in source and binary forms, with or
34
* without modification, are permitted provided that the following
@@ -26,7 +27,7 @@
2627
* THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
2728
* SUCH DAMAGE.
2829
*
29-
* Copyright (C) 2016 Tarantool AUTHORS:
30+
* Copyright (C) 2016 - 2018 Tarantool AUTHORS:
3031
* please see AUTHORS file.
3132
*/
3233

0 commit comments

Comments
 (0)