Annotation of parser3/tests/429-sql.html, revision 1.4

1.1       moko        1: @USE
                      2: 388-sql.html
                      3: 
                      4: @main[]
                      5: 
                      6: ^connect[$SQL.drivers.connect]{
                      7:        ^prepare-data[]
                      8:        ^basic-tests[]
                      9:        ^multi-tests[]
                     10: 
                     11:        $SPARSE(1)
                     12:        ^basic-tests-sparse[]
                     13:        $DISTINCT(1)
                     14:        ^prepare-data[]
                     15:        ^multi-tests[]
                     16: }
                     17: 
                     18: @basic-tests[]
                     19:        basic tests
                     20:        2.1 ^a[select * from pets]
                     21: 
                     22:        2.2 ^a[select * from pets; $.type[table]]
                     23: 
                     24:        2.3 ^a[select pet from pets]
                     25: 
                     26:        2.4 ^a[select pet from pets; $.type[string] ]
                     27: 
                     28:        2.5 ^try-catch{ ^a[select * from pets; $.type[string] ]}
                     29: 
                     30:        2.6 ^try-catch{ ^a[select * from pets; $.distinct(true) ]}
                     31: 
                     32:        2.7 ^a[select * from pets; $.type[table] $.limit(1) $.offset(1) ]
                     33: 
                     34:        2.8 ^a[select aggressive from pets; $.type[table] ]
                     35: 
1.2       moko       36:        2.9 ^try-catch{ ^a[select 2+2; $.bug(1) ] }
1.1       moko       37: 
                     38: @basic-tests-sparse[]
                     39:         basic tests sparse
1.3       moko       40:        3.1 ^a[select weigth as id, pet from pets; $.type[table] $.distinct(true) ]
                     41:        3.1.1 ^try-catch{ ^a[select weigth as id, pet from pets; $.type[table] ] }
1.1       moko       42: 
1.3       moko       43:        3.2 ^a[select weigth as id, pet from pets; $.type[string] $.distinct(true) ]
                     44:        3.2.1 ^try-catch{ ^a[select weigth as id, pet from pets; $.type[string] ] }
1.1       moko       45: 
                     46:        ^void:sql{delete from pets where pet='hamster'}
                     47: 
1.4     ! moko       48:        3.3 ^a[select weigth, pets.* from pets]
1.1       moko       49: 
1.4     ! moko       50:        3.4 ^a[select weigth, pets.* from pets; $.type[table]]
1.1       moko       51: 
                     52:        3.5 ^a[select weigth, food from pets; $.type[string] ]
                     53: 
1.4     ! moko       54:        3.6 ^try-catch{ ^a[select weigth, pets.* from pets; $.type[string] ]}
1.1       moko       55: 
1.4     ! moko       56:        3.7. ^a[select weigth, pets.* from pets; $.type[table] $.limit(1) $.offset(1) ]
1.1       moko       57: 
                     58:        3.8 ^try-catch{ ^a[select '1', pet from pets; $.type[string] ]}
                     59: 
                     60:        3.9 ^a[select weigth, pet from pets]
                     61: 
1.2       moko       62:        3.10 ^a[select weigth from pets]
                     63: 
                     64:        3.11 ^try-catch{ ^a[select -1 from pets] }
                     65: 
1.1       moko       66: 
                     67: @multi-tests[]
                     68:        multi statements tests
                     69: 
1.2       moko       70:        1.1 ^a[delete from pets where pet='']
                     71: 
1.4     ! moko       72:        1.2 ^a[select 0,pets.* from pets^;select 1,pets.* from pets; $.type[table] ]
1.1       moko       73:  
1.4     ! moko       74:        1.3 ^a[select 0,pets.* from pets^;select 0,pets.* from pets; $.type[table] ]
1.1       moko       75: 
1.4     ! moko       76:        1.4 ^a[select 0,pets.* from pets^;select 0, 2+2; $.type[table] ]
1.1       moko       77: 
1.4     ! moko       78:        1.5 ^a[select 0,pets.* from pets limit 2^;delete from pets where pet=''^;select 1,pets.* from pets limit 1; $.type[table] ]
1.1       moko       79: 
1.4     ! moko       80:        1.6 ^a[select 0,pets.* from pets^;delete from pets where pet=''^;select 1,pets.* from pets; $.type[table] $.limit(1) ] - minor bug: limit for last query only
1.1       moko       81: 
1.4     ! moko       82:        1.7 ^a[select weigth,food from pets^;select weigth+10,pets.* from pets; $.type[table] ]
1.1       moko       83: 
1.4     ! moko       84:        1.8 ^a[select weigth,food from pets^;select weigth+10,pets.* from pets;  ]
1.1       moko       85: 
1.4     ! moko       86:        1.9 ^a[select 0,pets.* from pets^;select 0, 2+2; $.type[hash] ]
        !            87:        1.10 ^a[select 0, 2+2^;select 0,pets.* from pets; $.type[hash] ]
1.1       moko       88: 
1.4     ! moko       89:        1.11 ^a[select 0,food from pets^;select 1,pets.* from pets; $.type[table] ]
        !            90:        1.12 ^a[select 0,food from pets^;select 0,pets.* from pets; $.type[table] ]
1.1       moko       91: 
                     92: @a[query;options]
                     93:        $h[^array::sql{$query}[$options ^if($SPARSE){ $.sparse(true) } ^if($DISTINCT){ $.distinct(true) } ]]
                     94:        ^json:string[$h; $.indent(1) ^if($SPARSE){ $.array[object] } ]

E-mail: