xs/backend_sqlite.xs

filter: Statementstmt 0.0% 0 / 9 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub n/a Podpod n/a totaltotal 0.0% 0 / 13 CC 0 SCAR 0
CC
0
Cov
0%
CRAP 0
« xs/backend_pg.xs ↑ Summary xs/backend.xs »
1 MODULE = Punk::Queue PACKAGE = Punk::Queue::Backend::SQLite
2  
3 # The SQLite divergences. Everything else this class answers to comes from
4 # Punk::Queue::Backend, which it inherits.
5  
6 SV *
7 dequeue(self, worker_id = 0, queues = NULL, tasks = NULL)
8 SV *self
9 IV worker_id
10 SV *queues
11 SV *tasks
12 PREINIT:
13 AV *q, *t;
14 SV *row;
15 CODE:
16 {
17 0 q = pq_sql_list(aTHX_ queues);
18 0 ▶ if (av_len(q) < 0) av_push(q, newSVpvs("default"));
Branch: 1 branch
BranchTrueFalseTotal
if (av_len(q) < 0) av_push(q, newSVpvs("default")); 0 0 0
19 0 t = pq_sql_list(aTHX_ tasks);
20  
21 0 row = pq_sqlite_dequeue(aTHX_ self, worker_id, q, t);
22 0 ▶ if (!row) XSRETURN_UNDEF;
Branch: 1 branch
BranchTrueFalseTotal
if (!row) XSRETURN_UNDEF; 0 0 0
23 0 RETVAL = row;
24 }
25 OUTPUT:
26 RETVAL
27  
28 # Transaction control, exposed so the conformance suite (phase 2) can drive
29 # it directly rather than only through the operations that use it.
30  
31 void
32 begin_immediate(self)
33 SV *self
34 CODE:
35 0 pq_sqlite_begin_exclusive(aTHX_ self);
36  
37 void
38 commit(self)
39 SV *self
40 CODE:
41 0 pq_sqlite_commit(aTHX_ self);
42  
43 void
44 rollback(self)
45 SV *self
46 CODE:
47 0 pq_sqlite_rollback(aTHX_ self);
« xs/backend_pg.xs ↑ Summary xs/backend.xs »