Ildar Absalyamov | 04b2b77 | 2015-03-19 15:09:51 -0700 | [diff] [blame^] | 1 | /* |
| 2 | * Test case Name : insert-syntax-change.aql |
| 3 | * Description : verify various AQL syntax for insert |
| 4 | * Expected Result : Success |
| 5 | * Date : 6th March 2013 |
| 6 | */ |
| 7 | |
| 8 | drop dataverse testdv2 if exists; |
| 9 | create dataverse testdv2; |
| 10 | use dataverse testdv2; |
| 11 | |
| 12 | create type testtype as open { |
| 13 | id: int32, |
| 14 | name: string |
| 15 | } |
| 16 | |
| 17 | create dataset testds(testtype) primary key id; |
| 18 | |
| 19 | insert into dataset testds ( |
| 20 | { "id": 1, "name": "Person One", "hobbies": {{"Rock", "Metal"}}} |
| 21 | ); |
| 22 | |
| 23 | insert into dataset testds ( |
| 24 | { "id": 2, "name": "Person Two", "hobbies": {{"Rock", "Jazz"}}} |
| 25 | ) |
| 26 | |
| 27 | insert into dataset testds { "id": 3, "name": "Person Three", "hobbies": {{"Blues"}}}; |
| 28 | |
| 29 | insert into dataset testds { "id": 4, "name": "Person Four", "hobbies": {{"Metal", "Jazz"}}} |
| 30 | |
| 31 | write output to nc1:"rttest/dml_insert-syntax.adm"; |
| 32 | |
| 33 | for $d in dataset("testds") |
| 34 | order by $d.id |
| 35 | return $d |