blob: c463cb04728c18992e9bd1c776c846c4c54871a4 [file] [log] [blame]
/*
* Testcase Name : open-closed-16.aql
* Description : Test open type dataset (with primitives).
* : Create Index on int 32 field
* : Insert data into primitives and retrieve data.
* Success : Yes this test should PASS!
* Date : March 30th 2012
*/
drop dataverse test if exists;
create dataverse test;
use dataverse test;
create type Schema as open{
id_8: int8,
id_16: int16,
id_32: int32,
id_64: int64,
fp : float,
name: string,
dt: date,
tm: time,
dt_tm: datetime,
lat_lon: point
}
create dataset tdtst(Schema) partitioned by key id_32;
insert into dataset tdtst(
let $f1:=time("10:50:56:200+05:00")
let $f2:=datetime("2011-12-31T14:00:00-10:00")
let $f3:=point("100.0,200.0")
return {
"id_8":100,
"id_16":1011,
"id_32":23455,
"id_64":34567,
"fp":87.61863f,
"name":"John",
"dt":"03-21-1982",
"tm": $f1,
"dt_tm": $f2,
"lat_lon": $f3
}
);
for $l in dataset('tdtst')
return $l