khfaraaz82@gmail.com | a271613 | 2012-04-30 06:20:50 +0000 | [diff] [blame] | 1 | /* |
| 2 | * Testcase Name : open-closed-13.aql |
| 3 | * Description : Attempt to insert additional data into a dataset which is defined as closed type. |
| 4 | * Success : This test should fail! No additional data allowed in datasets of closed type. |
| 5 | * Date : March 27 2012 |
| 6 | */ |
| 7 | |
| 8 | |
| 9 | create dataverse testdv2; |
| 10 | use dataverse testdv2; |
| 11 | |
| 12 | create type testtype as closed { |
| 13 | id: string, |
| 14 | name: string |
| 15 | } |
| 16 | |
khfaraaz82@gmail.com | 502731f | 2012-05-02 20:38:16 +0000 | [diff] [blame] | 17 | create dataset testds(testtype) partitioned by key id; |
khfaraaz82@gmail.com | a271613 | 2012-04-30 06:20:50 +0000 | [diff] [blame] | 18 | |
| 19 | insert into dataset testds ( |
| 20 | { "id": "001", "name": "Person Three", "hobbies": {{"scuba", "music"}}} |
| 21 | ); |
| 22 | |
| 23 | for $d in dataset("testds") |
| 24 | return $d |
| 25 | |