DBIx-Custom / t / dbix-custom-core-sqlite.t /
Newer Older
417 lines | 16.56kb
removed register_format()
yuki-kimoto authored on 2010-05-26
1
use Test::More;
2
use strict;
3
use warnings;
4

            
5
use utf8;
6
use Encode qw/encode_utf8 decode_utf8/;
7

            
8
BEGIN {
9
    eval { require DBD::SQLite; 1 }
10
        or plan skip_all => 'DBD::SQLite required';
11
    eval { DBD::SQLite->VERSION >= 1.25 }
12
        or plan skip_all => 'DBD::SQLite >= 1.25 required';
13

            
14
    plan 'no_plan';
15
    use_ok('DBIx::Custom');
16
}
17

            
18
# Function for test name
19
my $test;
20
sub test {
21
    $test = shift;
22
}
23

            
24
# Constant varialbes for test
25
my $CREATE_TABLE = {
26
    0 => 'create table table1 (key1 char(255), key2 char(255));',
27
    1 => 'create table table1 (key1 char(255), key2 char(255), key3 char(255), key4 char(255), key5 char(255));',
28
    2 => 'create table table2 (key1 char(255), key3 char(255));'
29
};
30

            
31
my $SELECT_TMPLS = {
32
    0 => 'select * from table1;'
33
};
34

            
35
my $DROP_TABLE = {
36
    0 => 'drop table table1'
37
};
38

            
39
my $NEW_ARGS = {
40
    0 => {data_source => 'dbi:SQLite:dbname=:memory:'}
41
};
42

            
43
# Variables
44
my $dbi;
45
my $sth;
46
my $tmpl;
47
my @tmpls;
48
my $select_tmpl;
49
my $insert_tmpl;
50
my $update_tmpl;
51
my $params;
52
my $sql;
53
my $result;
54
my $row;
55
my @rows;
56
my $rows;
57
my $query;
58
my @queries;
59
my $select_query;
60
my $insert_query;
61
my $update_query;
62
my $ret_val;
63

            
64

            
65
test 'disconnect';
66
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
67
$dbi->disconnect;
68
ok(!$dbi->dbh, $test);
69

            
70

            
71
# Prepare table
72
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
73
$dbi->execute($CREATE_TABLE->{0});
74
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2});
75
$dbi->insert(table => 'table1', param => {key1 => 3, key2 => 4});
76

            
77
test 'DBIx::Custom::Result test';
78
$tmpl = "select key1, key2 from table1";
79
$query = $dbi->create_query($tmpl);
80
$result = $dbi->execute($query);
81

            
82
@rows = ();
83
while (my $row = $result->fetch) {
84
    push @rows, [@$row];
85
}
removed reconnect method
yuki-kimoto authored on 2010-05-28
86
is_deeply(\@rows, [[1, 2], [3, 4]], "$test : fetch");
removed register_format()
yuki-kimoto authored on 2010-05-26
87

            
88
$result = $dbi->execute($query);
89
@rows = ();
90
while (my $row = $result->fetch_hash) {
91
    push @rows, {%$row};
92
}
removed reconnect method
yuki-kimoto authored on 2010-05-28
93
is_deeply(\@rows, [{key1 => 1, key2 => 2}, {key1 => 3, key2 => 4}], "$test : fetch_hash");
removed register_format()
yuki-kimoto authored on 2010-05-26
94

            
95
$result = $dbi->execute($query);
96
$rows = $result->fetch_all;
removed reconnect method
yuki-kimoto authored on 2010-05-28
97
is_deeply($rows, [[1, 2], [3, 4]], "$test : fetch_all");
removed register_format()
yuki-kimoto authored on 2010-05-26
98

            
99
$result = $dbi->execute($query);
removed reconnect method
yuki-kimoto authored on 2010-05-28
100
$rows = $result->fetch_hash_all;
101
is_deeply($rows, [{key1 => 1, key2 => 2}, {key1 => 3, key2 => 4}], "$test : fetch_hash_all");
removed register_format()
yuki-kimoto authored on 2010-05-26
102

            
103
test 'Insert query return value';
104
$dbi->execute($DROP_TABLE->{0});
105
$dbi->execute($CREATE_TABLE->{0});
106
$tmpl = "insert into table1 {insert key1 key2}";
107
$query = $dbi->create_query($tmpl);
108
$ret_val = $dbi->execute($query, param => {key1 => 1, key2 => 2});
109
ok($ret_val, $test);
110

            
111

            
112
test 'Direct query';
113
$dbi->execute($DROP_TABLE->{0});
114
$dbi->execute($CREATE_TABLE->{0});
115
$insert_tmpl = "insert into table1 {insert key1 key2}";
116
$dbi->execute($insert_tmpl, param => {key1 => 1, key2 => 2});
117
$result = $dbi->execute($SELECT_TMPLS->{0});
118
$rows = $result->fetch_hash_all;
119
is_deeply($rows, [{key1 => 1, key2 => 2}], $test);
120

            
121
test 'Filter basic';
122
$dbi->execute($DROP_TABLE->{0});
123
$dbi->execute($CREATE_TABLE->{0});
124
$dbi->register_filter(twice       => sub { $_[0] * 2}, 
125
                    three_times => sub { $_[0] * 3});
126

            
127
$insert_tmpl  = "insert into table1 {insert key1 key2};";
128
$insert_query = $dbi->create_query($insert_tmpl);
129
$insert_query->filter({key1 => 'twice'});
130
$dbi->execute($insert_query, param => {key1 => 1, key2 => 2});
131
$result = $dbi->execute($SELECT_TMPLS->{0});
132
$rows = $result->filter({key2 => 'three_times'})->fetch_hash_all;
133
is_deeply($rows, [{key1 => 2, key2 => 6}], "$test : filter fetch_filter");
134
$dbi->execute($DROP_TABLE->{0});
135

            
136
test 'Filter in';
137
$dbi->execute($CREATE_TABLE->{0});
138
$insert_tmpl  = "insert into table1 {insert key1 key2};";
139
$insert_query = $dbi->create_query($insert_tmpl);
140
$dbi->execute($insert_query, param => {key1 => 2, key2 => 4});
141
$select_tmpl = "select * from table1 where {in table1.key1 2} and {in table1.key2 2}";
142
$select_query = $dbi->create_query($select_tmpl);
143
$select_query->filter({'table1.key1' => 'twice'});
144
$result = $dbi->execute($select_query, param => {'table1.key1' => [1,5], 'table1.key2' => [2,4]});
145
$rows = $result->fetch_hash_all;
146
is_deeply($rows, [{key1 => 2, key2 => 4}], "$test : filter");
147

            
148
test 'DBIx::Custom::SQLTemplate basic tag';
149
$dbi->execute($DROP_TABLE->{0});
150
$dbi->execute($CREATE_TABLE->{1});
151
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5});
152
$dbi->insert(table => 'table1', param => {key1 => 6, key2 => 7, key3 => 8, key4 => 9, key5 => 10});
153

            
154
$tmpl = "select * from table1 where {= key1} and {<> key2} and {< key3} and {> key4} and {>= key5};";
155
$query = $dbi->create_query($tmpl);
156
$result = $dbi->execute($query, param => {key1 => 1, key2 => 3, key3 => 4, key4 => 3, key5 => 5});
157
$rows = $result->fetch_hash_all;
158
is_deeply($rows, [{key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5}], "$test : basic tag1");
159

            
160
$tmpl = "select * from table1 where {<= key1} and {like key2};";
161
$query = $dbi->create_query($tmpl);
162
$result = $dbi->execute($query, param => {key1 => 1, key2 => '%2%'});
163
$rows = $result->fetch_hash_all;
164
is_deeply($rows, [{key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5}], "$test : basic tag2");
165

            
166
test 'DIB::Custom::SQLTemplate in tag';
167
$dbi->execute($DROP_TABLE->{0});
168
$dbi->execute($CREATE_TABLE->{1});
169
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5});
170
$dbi->insert(table => 'table1', param => {key1 => 6, key2 => 7, key3 => 8, key4 => 9, key5 => 10});
171

            
172
$tmpl = "select * from table1 where {in key1 2};";
173
$query = $dbi->create_query($tmpl);
174
$result = $dbi->execute($query, param => {key1 => [9, 1]});
175
$rows = $result->fetch_hash_all;
176
is_deeply($rows, [{key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5}], "$test : basic");
177

            
178
test 'DBIx::Custom::SQLTemplate insert tag';
179
$dbi->execute("delete from table1");
180
$insert_tmpl = 'insert into table1 {insert key1 key2 key3 key4 key5}';
181
$dbi->execute($insert_tmpl, param => {key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5});
182

            
183
$result = $dbi->execute($SELECT_TMPLS->{0});
184
$rows = $result->fetch_hash_all;
185
is_deeply($rows, [{key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5}], "$test : basic");
186

            
187
test 'DBIx::Custom::SQLTemplate update tag';
188
$dbi->execute("delete from table1");
189
$insert_tmpl = "insert into table1 {insert key1 key2 key3 key4 key5}";
190
$dbi->execute($insert_tmpl, param => {key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5});
191
$dbi->execute($insert_tmpl, param => {key1 => 6, key2 => 7, key3 => 8, key4 => 9, key5 => 10});
192

            
193
$update_tmpl = 'update table1 {update key1 key2 key3 key4} where {= key5}';
194
$dbi->execute($update_tmpl, param => {key1 => 1, key2 => 1, key3 => 1, key4 => 1, key5 => 5});
195

            
196
$result = $dbi->execute($SELECT_TMPLS->{0});
197
$rows = $result->fetch_hash_all;
198
is_deeply($rows, [{key1 => 1, key2 => 1, key3 => 1, key4 => 1, key5 => 5},
199
                  {key1 => 6, key2 => 7, key3 => 8, key4 => 9, key5 => 10}], "$test : basic");
200

            
201
test 'Error case';
202
eval {DBIx::Custom->connect(data_source => 'dbi:SQLit')};
203
ok($@, "$test : connect error");
204

            
205
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
206
eval{$dbi->create_query("{p }")};
207
ok($@, "$test : create_query invalid SQL template");
208

            
209
test 'insert';
210
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
211
$dbi->execute($CREATE_TABLE->{0});
212
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2});
213
$dbi->insert(table => 'table1', param => {key1 => 3, key2 => 4});
214
$result = $dbi->execute($SELECT_TMPLS->{0});
215
$rows   = $result->fetch_hash_all;
216
is_deeply($rows, [{key1 => 1, key2 => 2}, {key1 => 3, key2 => 4}], "$test : basic");
217

            
218
$dbi->execute('delete from table1');
219
$dbi->register_filter(
220
    twice       => sub { $_[0] * 2 },
221
    three_times => sub { $_[0] * 3 }
222
);
223
$dbi->default_query_filter('twice');
224
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2}, filter => {key1 => 'three_times'});
225
$result = $dbi->execute($SELECT_TMPLS->{0});
226
$rows   = $result->fetch_hash_all;
227
is_deeply($rows, [{key1 => 3, key2 => 4}], "$test : filter");
228
$dbi->default_query_filter(undef);
229

            
230
$dbi->execute($DROP_TABLE->{0});
231
$dbi->execute($CREATE_TABLE->{0});
232
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2}, append => '   ');
233
$rows = $dbi->select(table => 'table1')->fetch_hash_all;
234
is_deeply($rows, [{key1 => 1, key2 => 2}], 'insert append');
235

            
236
test 'update';
237
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
238
$dbi->execute($CREATE_TABLE->{1});
239
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5});
240
$dbi->insert(table => 'table1', param => {key1 => 6, key2 => 7, key3 => 8, key4 => 9, key5 => 10});
241
$dbi->update(table => 'table1', param => {key2 => 11}, where => {key1 => 1});
242
$result = $dbi->execute($SELECT_TMPLS->{0});
243
$rows   = $result->fetch_hash_all;
244
is_deeply($rows, [{key1 => 1, key2 => 11, key3 => 3, key4 => 4, key5 => 5},
245
                  {key1 => 6, key2 => 7,  key3 => 8, key4 => 9, key5 => 10}],
246
                  "$test : basic");
247
                  
248
$dbi->execute("delete from table1");
249
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5});
250
$dbi->insert(table => 'table1', param => {key1 => 6, key2 => 7, key3 => 8, key4 => 9, key5 => 10});
251
$dbi->update(table => 'table1', param => {key2 => 12}, where => {key2 => 2, key3 => 3});
252
$result = $dbi->execute($SELECT_TMPLS->{0});
253
$rows   = $result->fetch_hash_all;
254
is_deeply($rows, [{key1 => 1, key2 => 12, key3 => 3, key4 => 4, key5 => 5},
255
                  {key1 => 6, key2 => 7,  key3 => 8, key4 => 9, key5 => 10}],
256
                  "$test : update key same as search key");
257

            
258
$dbi->execute("delete from table1");
259
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5});
260
$dbi->insert(table => 'table1', param => {key1 => 6, key2 => 7, key3 => 8, key4 => 9, key5 => 10});
261
$dbi->register_filter(twice => sub { $_[0] * 2 });
262
$dbi->update(table => 'table1', param => {key2 => 11}, where => {key1 => 1},
263
              filter => {key2 => 'twice'});
264
$result = $dbi->execute($SELECT_TMPLS->{0});
265
$rows   = $result->fetch_hash_all;
266
is_deeply($rows, [{key1 => 1, key2 => 22, key3 => 3, key4 => 4, key5 => 5},
267
                  {key1 => 6, key2 => 7,  key3 => 8, key4 => 9, key5 => 10}],
268
                  "$test : filter");
269

            
270

            
271
$result = $dbi->update(table => 'table1', param => {key2 => 11}, where => {key1 => 1}, append => '   ');
272

            
273
test 'update_all';
274
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
275
$dbi->execute($CREATE_TABLE->{1});
276
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2, key3 => 3, key4 => 4, key5 => 5});
277
$dbi->insert(table => 'table1', param => {key1 => 6, key2 => 7, key3 => 8, key4 => 9, key5 => 10});
278
$dbi->register_filter(twice => sub { $_[0] * 2 });
279
$dbi->update_all(table => 'table1', param => {key2 => 10}, filter => {key2 => 'twice'});
280
$result = $dbi->execute($SELECT_TMPLS->{0});
281
$rows   = $result->fetch_hash_all;
282
is_deeply($rows, [{key1 => 1, key2 => 20, key3 => 3, key4 => 4, key5 => 5},
283
                  {key1 => 6, key2 => 20, key3 => 8, key4 => 9, key5 => 10}],
284
                  "$test : filter");
285

            
286

            
287
test 'delete';
288
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
289
$dbi->execute($CREATE_TABLE->{0});
290
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2});
291
$dbi->insert(table => 'table1', param => {key1 => 3, key2 => 4});
292
$dbi->delete(table => 'table1', where => {key1 => 1});
293
$result = $dbi->execute($SELECT_TMPLS->{0});
294
$rows   = $result->fetch_hash_all;
295
is_deeply($rows, [{key1 => 3, key2 => 4}], "$test : basic");
296

            
297
$dbi->execute("delete from table1;");
298
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2});
299
$dbi->insert(table => 'table1', param => {key1 => 3, key2 => 4});
300
$dbi->register_filter(twice => sub { $_[0] * 2 });
301
$dbi->delete(table => 'table1', where => {key2 => 1}, filter => {key2 => 'twice'});
302
$result = $dbi->execute($SELECT_TMPLS->{0});
303
$rows   = $result->fetch_hash_all;
304
is_deeply($rows, [{key1 => 3, key2 => 4}], "$test : filter");
305

            
306
$dbi->delete(table => 'table1', where => {key1 => 1}, append => '   ');
307

            
308
$dbi->delete_all(table => 'table1');
309
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2});
310
$dbi->insert(table => 'table1', param => {key1 => 3, key2 => 4});
311
$dbi->delete(table => 'table1', where => {key1 => 1, key2 => 2});
312
$rows = $dbi->select(table => 'table1')->fetch_hash_all;
313
is_deeply($rows, [{key1 => 3, key2 => 4}], "$test : delete multi key");
314

            
315
test 'delete error';
316
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
317
$dbi->execute($CREATE_TABLE->{0});
318
eval{$dbi->delete(table => 'table1')};
319
like($@, qr/Key-value pairs for where clause must be specified to 'delete' second argument/,
320
         "$test : where key-value pairs not specified");
321

            
322
test 'delete_all';
323
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
324
$dbi->execute($CREATE_TABLE->{0});
325
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2});
326
$dbi->insert(table => 'table1', param => {key1 => 3, key2 => 4});
327
$dbi->delete_all(table => 'table1');
328
$result = $dbi->execute($SELECT_TMPLS->{0});
329
$rows   = $result->fetch_hash_all;
330
is_deeply($rows, [], "$test : basic");
331

            
332

            
333
test 'select';
334
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
335
$dbi->execute($CREATE_TABLE->{0});
336
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2});
337
$dbi->insert(table => 'table1', param => {key1 => 3, key2 => 4});
338
$rows = $dbi->select(table => 'table1')->fetch_hash_all;
339
is_deeply($rows, [{key1 => 1, key2 => 2},
340
                  {key1 => 3, key2 => 4}], "$test : table");
341

            
update document
yuki-kimoto authored on 2010-05-27
342
$rows = $dbi->select(table => 'table1', column => ['key1'])->fetch_hash_all;
removed register_format()
yuki-kimoto authored on 2010-05-26
343
is_deeply($rows, [{key1 => 1}, {key1 => 3}], "$test : table and columns and where key");
344

            
345
$rows = $dbi->select(table => 'table1', where => {key1 => 1})->fetch_hash_all;
346
is_deeply($rows, [{key1 => 1, key2 => 2}], "$test : table and columns and where key");
347

            
update document
yuki-kimoto authored on 2010-05-27
348
$rows = $dbi->select(table => 'table1', column => ['key1'], where => {key1 => 3})->fetch_hash_all;
removed register_format()
yuki-kimoto authored on 2010-05-26
349
is_deeply($rows, [{key1 => 3}], "$test : table and columns and where key");
350

            
351
$rows = $dbi->select(table => 'table1', append => "order by key1 desc limit 1")->fetch_hash_all;
352
is_deeply($rows, [{key1 => 3, key2 => 4}], "$test : append statement");
353

            
354
$dbi->register_filter(decrement => sub { $_[0] - 1 });
update document
yuki-kimoto authored on 2010-05-27
355
$rows = $dbi->select(table => 'table1', where => {key1 => 2}, filter => {key1 => 'decrement'})
removed register_format()
yuki-kimoto authored on 2010-05-26
356
            ->fetch_hash_all;
357
is_deeply($rows, [{key1 => 1, key2 => 2}], "$test : filter");
358

            
359
$dbi->execute($CREATE_TABLE->{2});
360
$dbi->insert(table => 'table2', param => {key1 => 1, key3 => 5});
361
$rows = $dbi->select(
362
    table => [qw/table1 table2/],
update document
yuki-kimoto authored on 2010-05-27
363
    column => ['table1.key1 as table1_key1', 'table2.key1 as table2_key1', 'key2', 'key3'],
removed register_format()
yuki-kimoto authored on 2010-05-26
364
    where   => {'table1.key2' => 2},
added commit method
yuki-kimoto authored on 2010-05-27
365
    relation  => {'table1.key1' => 'table2.key1'}
removed register_format()
yuki-kimoto authored on 2010-05-26
366
)->fetch_hash_all;
added commit method
yuki-kimoto authored on 2010-05-27
367
is_deeply($rows, [{table1_key1 => 1, table2_key1 => 1, key2 => 2, key3 => 5}], "$test : relation : exists where");
368

            
369
$rows = $dbi->select(
370
    table => [qw/table1 table2/],
371
    column => ['table1.key1 as table1_key1', 'table2.key1 as table2_key1', 'key2', 'key3'],
372
    relation  => {'table1.key1' => 'table2.key1'}
373
)->fetch_hash_all;
374
is_deeply($rows, [{table1_key1 => 1, table2_key1 => 1, key2 => 2, key3 => 5}], "$test : relation : no exists where");
removed register_format()
yuki-kimoto authored on 2010-05-26
375

            
376
test 'fetch filter';
377
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
378
$dbi->register_filter(
379
    twice       => sub { $_[0] * 2 },
380
    three_times => sub { $_[0] * 3 }
381
);
382
$dbi->default_fetch_filter('twice');
383
$dbi->execute($CREATE_TABLE->{0});
384
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2});
385
$result = $dbi->select(table => 'table1');
386
$result->filter({key1 => 'three_times'});
removed reconnect method
yuki-kimoto authored on 2010-05-28
387
$row = $result->fetch_hash_first;
removed register_format()
yuki-kimoto authored on 2010-05-26
388
is_deeply($row, {key1 => 3, key2 => 4}, "$test: default_fetch_filter and filter");
389

            
390
test 'filters';
391
$dbi = DBIx::Custom->new;
392

            
update document
yuki-kimoto authored on 2010-05-27
393
is($dbi->filters->{decode_utf8}->(encode_utf8('あ')),
394
   'あ', "$test : decode_utf8");
removed register_format()
yuki-kimoto authored on 2010-05-26
395

            
396
is($dbi->filters->{encode_utf8}->('あ'),
397
   encode_utf8('あ'), "$test : encode_utf8");
398

            
added commit method
yuki-kimoto authored on 2010-05-27
399
test 'transaction';
400
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
401
$dbi->execute($CREATE_TABLE->{0});
402
$dbi->auto_commit(0);
403
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2});
404
$dbi->insert(table => 'table1', param => {key1 => 2, key2 => 3});
405
$dbi->commit;
406
$result = $dbi->select(table => 'table1');
407
is_deeply(scalar $result->fetch_hash_all, [{key1 => 1, key2 => 2}, {key1 => 2, key2 => 3}],
408
          "$test : commit");
409

            
410
$dbi = DBIx::Custom->connect($NEW_ARGS->{0});
411
$dbi->execute($CREATE_TABLE->{0});
412
$dbi->auto_commit(0);
413
$dbi->insert(table => 'table1', param => {key1 => 1, key2 => 2});
414
$dbi->rollback;
415

            
416
$result = $dbi->select(table => 'table1');
removed reconnect method
yuki-kimoto authored on 2010-05-28
417
ok(! $result->fetch_first, "$test: rollback");