os/persistentdata/persistentstorage/sql/TEST/testexecute/SQLite/config/APIBasic.ini
First public contribution.
2 // Called by BasicSQL2.script. This config file contains information
3 // for basic API tests. We're going to exercise to some basic level all
4 // client side APIs the SQLite system. In some cases we'll make deliberate
5 // errors and look for the expected error codes and messages.
8 // First some basic RSqlDatabase tests.
11 Delete1=C:\BrieflyExists.db
12 ExpectedError1=KErrNotFound
13 Open2=C:\BrieflyExists.db
14 ExpectedError2=KErrNotFound
16 NoOperation4=C:\BrieflyExists.db
17 NoOperation4=KErrNotFound
18 Create5=C:\BrieflyExists.db
20 Create7=C:\BrieflyExists.db
21 ExpectedError7=KErrAlreadyExists
22 Open8=C:\BrieflyExists.db
23 Exec9=what a load of gibberish
24 ExpectedError9=KSqlErrGeneral
25 LastErrorMessage10=near "what": syntax error
26 Exec11=Create Table Table1(Field1 int primary key, Field2 text, Field3 Real);
27 SetIsolationLevel12=EReadUncommitted
29 Delete14=C:\BrieflyExists.db
30 Delete15=C:\SqlStatement.db
31 ExpectedError15=KErrNotFound
32 Create16=C:\SqlStatement.db
33 Exec17=Create Table Table1(Field1 int primary key, Field2 text, Field3 Real);
34 NewBlock18=rsqlstatement
37 // Leave the db lying around, we'll do some more in another script line.
39 // Play with BindInt, BindReal, BindNull and BindText.
40 // Check the result with AtRow, ColumnInt, ColumnReal, ColumnTextL (result
41 // specified inline, not in a file), also checks IsNull to check the previous
44 Prepare0=Insert into Table1(Field1, Field2, Field3) values(:huey, :dewey, :louie);
46 ParameterIndex2=:dewey
47 ParameterIndex3=:louie
49 BindText5=1,Here's some text.
50 BindReal6=2,2.7182818282
54 BindText10=1,Some more text....
55 BindReal11=2,3.141592654
59 BindText15=1,Yet more text....
60 BindReal16=2,9.869604401
65 BindReal21=2,6.0827626
68 Prepare24=select * from table1;
76 ColumnType32=1,ESqlText
77 ColumnTextL33=1,Here's some text.
78 ColumnReal34=2,2.7182818282
82 ColumnTextL38=1,Some more text....
83 ColumnReal39=2,3.141592654
87 ColumnTextL43=1,Yet more text....
88 ColumnReal44=2,9.869604401
92 ColumnReal48=2,6.0827626
93 Delete49=C:\SqlStatement.db
94 ExpectedError49=KErrInUse
100 // This is a separate case, trigger by the second line in the script file.
101 // It adds to the existing table in SqlStatement.db, checks 'ColumnInt64',
102 // and BindInt64, plus verifies the return from 'Next'. On completion this
103 // section deletes the database.
105 Open0=C:\SqlStatement.db
106 Exec1=alter table Table1 add Field4 int;
107 Prepare2=Update Table1 Set Field4=108 where Field3 < 5.8;
111 Prepare6=Insert into Table1(Field1, Field2, Field3, Field4) values(:huey, :dewey, :louie, :donald);
112 ParameterIndex7=:huey
113 ParameterIndex8=:dewey
114 ParameterIndex9=:louie
115 ParameterIndex10=:donald
116 ParameterIndex11=:somerubbish
117 ExpectedError11=KErrNotFound
118 // The next line may not be appropriate - I think LastErrorMessage is only
119 // relevant following a 'KSqlErrGeneral' (which we don't have).
120 LastErrorMessage12=not an error
122 BindText14=1,AddtoTable stuff
123 BindReal15=2,299792458
124 BindInt64_16=3,123456789012345
128 Prepare20=select * from table1 where Field1=17141;
133 ColumnType25=0,ESqlInt64
134 ColumnInt64_26=0,123456789012345
138 Delete30=C:\SqlStatement.db
141 // Tests writing to a text field with a stream (RSqlParamWriteStream).
142 // Checks the content with all variants of ColumnText.
145 ExpectedError0=KErrNotFound
147 Exec2=create table table2(field1 text(32770), field2 integer);
148 Prepare3=insert into table2(field1, field2) values(:largetext, :int);
149 ParameterIndex4=:largetext
151 StreamWriteBindText6=0,Z:\TEF_SQL\TestData\reference1.txt
157 Prepare11=SELECT * from table2;
163 ColumnTextP17=0,Z:\TEF_SQL\TestData\reference1.txt
164 ColumnInt18=1,1234321
168 Prepare21=SELECT * from table2;
174 ColumnTextL27=0,Z:\TEF_SQL\TestData\reference1.txt
175 ColumnInt28=1,1234321
179 Prepare31=SELECT * from table2;
185 ColumnTextD37=0,Z:\TEF_SQL\TestData\reference1.txt
186 ColumnInt38=1,1234321
190 Prepare41=SELECT * from table2;
196 StreamReadColText47=0,Z:\TEF_SQL\TestData\reference1.txt
197 ColumnInt48=1,1234321
202 Delete52=C:\texttest1
206 Delete0=C:\binarytest1
207 ExpectedError0=KErrNotFound
208 Create1=C:\binarytest1
209 Exec2=create table table2(field1 blob(32770));
210 Prepare3=insert into table2(field1) values(:largebin);
211 ParameterIndex4=:largebin
212 StreamWriteBindBin5=0,Z:\TEF_SQL\TestData\reference1.bin
217 Prepare9=SELECT field1 from table2;
221 ColumnBinaryL13=0,Z:\TEF_SQL\TestData\reference1.bin
225 Prepare16=SELECT field1 from table2;
229 ColumnBinaryP20=0,Z:\TEF_SQL\TestData\reference1.bin
233 Prepare23=SELECT field1 from table2;
237 ColumnBinaryD27=0,Z:\TEF_SQL\TestData\reference1.bin
241 Prepare30=SELECT field1 from table2;
245 StreamReadColBin34=0,Z:\TEF_SQL\TestData\reference1.bin
250 Delete38=C:\binarytest1
253 // Use anonymous (if that's the right word) column indices to check, for
254 // example the number of records in a database.
257 Copy0=Z:\TEF_SQL\TestData\test1.db,Z:\test1.db
258 ExpectedError0=KErrAccessDenied
260 ExpectedError1=KErrNotFound
261 Copy2=Z:\TEF_SQL\TestData\test1.db,C:\test1.db
263 Prepare4=select count(*) from phone;
269 Prepare10=select avg(cm_id) from phone;
275 Prepare16=select sum(cm_id) from phone;
283 // This delete is in itself a test - the 'Copy' above does not and should not
284 // propagate file permissions from the Z: drive. If it did, this delete would
285 // fail, but it should not.