Pg: Don't return self on / cache() or text_*() methods
This is much too easy of a footgun: $db->cache->q(...); Enabled cache on the $db object, not just for the given query.
This commit is contained in:
parent
13271fa413
commit
ab168bd952
2 changed files with 7 additions and 3 deletions
2
FU.xs
2
FU.xs
|
|
@ -55,7 +55,6 @@
|
|||
if (!ix) ix = FUPG_CACHE;\
|
||||
if (items == 1 || SvTRUE(ST(1))) x->stflags |= ix; \
|
||||
else x->stflags &= ~ix; \
|
||||
XSRETURN(1); \
|
||||
} while(0)
|
||||
|
||||
MODULE = FU
|
||||
|
|
@ -343,6 +342,7 @@ void cache(fupg_st *x, ...)
|
|||
CODE:
|
||||
if (ix == 0 && x->prepared) fu_confess("Invalid attempt to change statement configuration after it has already been prepared or executed");
|
||||
FUPG_STFLAGS;
|
||||
XSRETURN(1);
|
||||
|
||||
void exec(fupg_st *st)
|
||||
CODE:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue