Content-Type: text/html
Content-Length: 4662
1. 2 + 2 = 4
2. void
2.1
2.3
Exception type: sql.execute,
Source: select * from pets,
Comment: must return nothing
2.4
Exception type: parser.runtime,
Source: sql,
Comment: called with invalid option
2.5
Exception type: sql.execute,
Source: query,
Comment: bind variables not supported yet
2.6 Multiple queries:
2.8 Multiple queries, data in first query:
Exception type: sql.execute,
Source: select 2+2 ; delete from pets where pet='',
Comment: must return nothing
2.9 Multiple queries, data in second query:
Exception type: sql.execute,
Source: delete from pets where pet='' ; select 2+2,
Comment: must return nothing
3. int/double
3.1 2 int
3.2
Exception type: parser.runtime,
Source: sql,
Comment: produced no result, but no default option specified
3.3 1
3.4 -2 double
3.5
Exception type: parser.runtime,
Source: sql,
Comment: produced no result, but no default option specified
3.6 1
3.7 Multiple queries, data in first query: 4
3.8 Multiple queries, data in second query: 4
3.9 Multiple queries, data in both queries:
Exception type: sql.execute,
Source: select 2+2 ; select 3+3 ,
Comment: result must contain exactly one column
4. hash
4.1
{
"cat":{
"food":"milk",
"aggressive":"'very'",
"weigth":"5"
},
"dog":{
"food":"bone",
"aggressive":"\"never\"",
"weigth":"10"
},
"hamster":{
"food":"grain",
"aggressive":"",
"weigth":"1"
},
"parrot":{
"food":"grain",
"aggressive":"alwayws",
"weigth":"1"
}
}
4.2
{
"cat":[
{"pet":"cat","food":"milk","aggressive":"'very'","weigth":"5"}
],
"dog":[
{"pet":"dog","food":"bone","aggressive":"\"never\"","weigth":"10"}
],
"hamster":[
{"pet":"hamster","food":"grain","aggressive":"","weigth":"1"}
],
"parrot":[
{"pet":"parrot","food":"grain","aggressive":"alwayws","weigth":"1"}
]
}
4.3
{
"cat":"milk",
"dog":"bone",
"hamster":"grain",
"parrot":"grain"
}
4.4
Exception type: sql.execute,
Source: select * from pets,
Comment: only 2 columns allowed for $.type[string]
4.5.
{
"dog":[
{"pet":"dog","food":"bone","aggressive":"\"never\"","weigth":"10"}
]
}
4.6
Exception type: sql.execute,
Source: select 'dup', pet from pets,
Comment: duplicate key
4.7
{
"cat":true,
"dog":true,
"hamster":true,
"parrot":true
}
4.7.1
{
"'very'":true,
"\"never\"":true,
"":true,
"alwayws":true
}
4.8
{
"milk":[
{"id":"milk","pet":"cat"}
],
"bone":[
{"id":"bone","pet":"dog"}
],
"grain":[
{"id":"grain","pet":"hamster"},
{"id":"grain","pet":"parrot"}
]
}
4.9
{
"milk":"cat",
"bone":"dog",
"grain":"hamster"
}
5. table
5.1
[
{"pet":"cat","food":"milk","aggressive":"'very'","weigth":"5"},
{"pet":"dog","food":"bone","aggressive":"\"never\"","weigth":"10"},
{"pet":"hamster","food":"grain","aggressive":"","weigth":"1"},
{"pet":"parrot","food":"grain","aggressive":"alwayws","weigth":"1"}
]
5.2.
[
{"pet":"dog","food":"bone","aggressive":"\"never\"","weigth":"10"}
]
5.3
Exception type: sql.execute,
Source: select * from pets,
Comment: bind variables not supported yet
5.4
Exception type: parser.runtime,
Source: sql,
Comment: called with invalid option
6. file
6.1
{
"class":"file",
"name":"test.txt",
"size":6,
"mode":"binary",
"content-type":"text\/plain",
"text":"'very'"
}
6.2
{
"class":"file",
"name":"unknown",
"size":7,
"mode":"binary",
"content-type":"unknown",
"text":"\"never\""
}
6.3
Exception type: sql.execute,
Source: select * from pets,
Comment: result must contain no more than 3 columns
6.4
Exception type: parser.runtime,
Source: sql,
Comment: produced no result
6.5
Exception type: sql.execute,
Source: select 1 from pets,
Comment: result must contain no more than 1 row
6.6
Exception type: sql.execute,
Source: select 1,2 from pets,
Comment: result must contain no more than 1 row
6.7
Exception type: parser.runtime,
Source: sql,
Comment: called with invalid option
6.8 "''test''"
7. string
7.1
Exception type: sql.execute,
Source: select * from pets,
Comment: result must contain exactly one column
7.2
Exception type: sql.execute,
Source: select pet from pets,
Comment: result must contain no more than one row
7.3
Exception type: sql.execute,
Source: select 2+2,
Comment: bind variables not supported yet
7.4
Exception type: parser.runtime,
Source: sql,
Comment: called with invalid option
7.5
Exception type: parser.runtime,
Source: sql,
Comment: produced no result, but no default option specified
7.6
"default"
E-mail: