123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307 |
- ===
- POST /columns
-
- {"name":"types","type":"table","columns":[{"name":"id","type":"integer","pk":true},{"name":"integer","type":"integer"},{"name":"bigint","type":"bigint"},{"name":"varchar","type":"varchar","length":10},{"name":"decimal","type":"decimal","precision":10,"scale":4},{"name":"float","type":"float"},{"name":"double","type":"double"},{"name":"boolean","type":"boolean"},{"name":"date","type":"date"},{"name":"time","type":"time"},{"name":"timestamp","type":"timestamp"},{"name":"clob","type":"clob"},{"name":"blob","type":"blob"},{"name":"geometry","type":"geometry"}]}
- ===
- 200
- Content-Type: application/json
- Content-Length: 4
-
- true
- ===
- POST /records/types
- Content-Type: application/json
-
- {"integer":2,"bigint":3,"varchar":"abc","decimal":"1.23","float":1,"double":23.45,"boolean":true,"date":"1970-01-01","time":"00:00:01","timestamp":"2001-02-03 04:05:06","clob":"a","blob":"YQ==","geometry":"POINT(1 2)"}
- ===
- 200
- Content-Type: application/json
- Content-Length: 1
-
- 1
- ===
- PUT /records/types/1
-
- {"boolean":null}
- ===
- 422
- Content-Type: application/json
- Content-Length: 100
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"boolean":"cannot be null"}}
- ===
- PUT /records/types/1
-
- {"integer":" 1\n"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 104
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"integer":"illegal whitespace"}}
- ===
- PUT /records/types/1
-
- {"integer":"23e"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 101
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"integer":"invalid integer"}}
- ===
- PUT /records/types/1
-
- integer=23e
- ===
- 422
- Content-Type: application/json
- Content-Length: 101
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"integer":"invalid integer"}}
- ===
- PUT /records/types/1
-
- {"integer":"2.3"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 101
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"integer":"invalid integer"}}
- ===
- PUT /records/types/1
-
- {"integer":2.3}
- ===
- 422
- Content-Type: application/json
- Content-Length: 101
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"integer":"invalid integer"}}
- ===
- PUT /records/types/1
-
- {"integer":"12345678901"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 101
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"integer":"invalid integer"}}
- ===
- PUT /records/types/1
-
- {"bigint":"12345678901234567890"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 100
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"bigint":"invalid integer"}}
- ===
- PUT /records/types/1
-
- {"varchar":"12345678901"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 101
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"varchar":"string too long"}}
- ===
- PUT /records/types/1
-
- {"decimal":"12.23.34"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 101
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"decimal":"invalid decimal"}}
- ===
- PUT /records/types/1
-
- {"decimal":"1131313145345"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 103
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"decimal":"decimal too large"}}
- ===
- PUT /records/types/1
-
- {"decimal":"1234567.123"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 103
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"decimal":"decimal too large"}}
- ===
- PUT /records/types/1
-
- {"decimal":"123456.12345"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 105
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"decimal":"decimal too precise"}}
- ===
- PUT /records/types/1
-
- {"decimal":"113131.3145345"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 105
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"decimal":"decimal too precise"}}
- ===
- PUT /records/types/1
-
- {"float":"string"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 97
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"float":"invalid float"}}
- ===
- PUT /records/types/1
-
- {"double":"string"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 98
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"double":"invalid float"}}
- ===
- PUT /records/types/1
-
- {"boolean":-1}
- ===
- 422
- Content-Type: application/json
- Content-Length: 101
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"boolean":"invalid boolean"}}
- ===
- PUT /records/types/1
-
- {"date":"string"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 95
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"date":"invalid date"}}
- ===
- PUT /records/types/1
-
- {"date":"still-no-date"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 95
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"date":"invalid date"}}
- ===
- PUT /records/types/1
-
- {"time":"string"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 95
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"time":"invalid time"}}
- ===
- PUT /records/types/1
-
- {"time":"still:no:time"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 95
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"time":"invalid time"}}
- ===
- PUT /records/types/1
-
- {"time":"999:999:999"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 95
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"time":"invalid time"}}
- ===
- PUT /records/types/1
-
- {"timestamp":"string"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 105
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"timestamp":"invalid timestamp"}}
- ===
- PUT /records/types/1
-
- {"timestamp":"2001-01-01 999:999:999"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 105
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"timestamp":"invalid timestamp"}}
- ===
- PUT /records/types/1
-
- {"clob":"𠜎𠜱𠝹𠱓𠱸𠲖𠳏𠳕𠴕𠵼𠵿𠸎𠸏𠹷𠺝𠺢𠻗"}
- ===
- 200
- Content-Type: application/json
- Content-Length: 1
-
- 1
- ===
- PUT /records/types/1
-
- {"blob":"!"}
- ===
- 422
- Content-Type: application/json
- Content-Length: 97
-
- {"code":1013,"message":"Input validation failed for 'types'","details":{"blob":"invalid base64"}}
- ===
- PUT /records/types/1
-
- {"blob":"T8O5IGVzdCBsZSBjYWbDqSBsZSBwbHVzIHByb2NoZT8"}
- ===
- 200
- Content-Type: application/json
- Content-Length: 1
-
- 1
- ===
- GET /records/types/1
- ===
- 200
- Content-Type: application/json
- Content-Length: 334
-
- {"id":1,"integer":2,"bigint":3,"varchar":"abc","decimal":"1.2300","float":1,"double":23.45,"boolean":true,"date":"1970-01-01","time":"00:00:01","timestamp":"2001-02-03 04:05:06","clob":"𠜎𠜱𠝹𠱓𠱸𠲖𠳏𠳕𠴕𠵼𠵿𠸎𠸏𠹷𠺝𠺢𠻗","blob":"T8O5IGVzdCBsZSBjYWbDqSBsZSBwbHVzIHByb2NoZT8=","geometry":"POINT(1 2)"}
- ===
- DELETE /columns/types
- ===
- 200
- Content-Type: application/json
- Content-Length: 4
-
- true
|