finally:
cursor.close()
+ @contextmanager
+ def execute_(self, statement, locals):
+ with self.cursor() as cursor:
+ cursor.execute(statement.format(**locals), locals)
+ yield cursor
+
@contextmanager
def execute(self, statement, depth=0):
with self.cursor() as cursor:
with self.connection.execute(statement, 1) as cursor:
pass
+ def push_(self, statement, locals):
+ with self.connection.execute_(statement, locals) as cursor:
+ pass
+
def exists(self, statement):
return self.yank('''
select exists (