def sqlmany ( self , stringname , * args ) : if hasattr ( self , 'alchemist' ) : return getattr ( self . alchemist . many , stringname ) ( * args ) s = self . strings [ stringname ] return self . connection . cursor ( ) . executemany ( s , args )
python flask sqlalchemy query on a query
Wrapper for executing many SQL calls on my connection .
def sqlmany(self, stringname, *args):
        """Wrapper for executing many SQL calls on my connection.

        First arg is the name of a query, either a key in the
        precompiled JSON or a method name in
        ``allegedb.alchemy.Alchemist``. Remaining arguments should be
        tuples of argument sequences to be passed to the query.

        """
        if hasattr(self, 'alchemist'):
            return getattr(self.alchemist.many, stringname)(*args)
        s = self.strings[stringname]
        return self.connection.cursor().executemany(s, args)