Executes the sql statement, but does not commit. Returns the cursor to commit

        @return: DB and cursor instance following sql execution
515068
def execute_read_only(*args, **kwargs):
        # TODO: consolidate with execute
        

        # Inspect the call stack for the originating call
        args = CoyoteDb.__add_query_comment(args[0])

        # Execute the query
        db = CoyoteDb.__get_db_read_instance()
        cursor = db.cursor()
        try:
            cursor.execute(*args, **kwargs)
        except OperationalError, e:
            raise OperationalError('{} when executing: {}'.format(e.args, args[0]))
        return db, cursor
874651
def delete(self):
        
        (sql, ) = self._prepareSQL("DELETE")
        curs = self.cursor()
        curs.execute(sql, self._getID())
        curs.close()
        self.reset()
227001
def setup_sql(self, graphs):
        
        with closing(self.db.cursor()) as cursor:
            for table in graphs:
                cursor.execute(SQL.CREATE_TABLE % (table))
                for index in SQL.INDEXES:
                    cursor.execute(index % (table))
            self.db.commit()
660286
def execute(self, sql, params=None):
        
        # wrap in a transaction to ensure things are committed
        # https://github.com/smnorris/pgdata/issues/3
        with self.engine.begin() as conn:
            result = conn.execute(sql, params)
        return result
1171073
def make_cursor(path, init_statements=(), _connectioncache={}):
    """"""
    connection = _connectioncache.get(path)
    if not connection:
        is_new = not os.path.exists(path) or not os.path.getsize(path)
        try: is_new and os.makedirs(os.path.dirname(path))
        except OSError: pass
        connection = sqlite3.connect(path, isolation_level=None,
            check_same_thread=False, detect_types=sqlite3.PARSE_DECLTYPES)
        for x in init_statements or (): connection.execute(x)
        try: is_new and ":memory:" not in path.lower() and os.chmod(path, 0707)
        except OSError: pass
        connection.row_factory = lambda cur, row: dict(sqlite3.Row(cur, row))
        _connectioncache[path] = connection
    return connection.cursor()
488235
private void executeSql(final Connection connection, final String sql, final boolean isCommit) throws SQLException
   {
      if (sql != null) {
         try (Statement statement = connection.createStatement()) {
            // connection was created a few milliseconds before, so set query timeout is omitted (we assume it will succeed)
            statement.execute(sql);
         }

         if (isIsolateInternalQueries && !isAutoCommit) {
            if (isCommit) {
               connection.commit();
            }
            else {
               connection.rollback();
            }
         }
      }
   }
886424
def execute(self, *args, **kwargs):
        

        with self:
            self._cursor.execute(*args, **kwargs)
1055202
def _connect(self):
        

        try:
            db = pymysql.connect(user=self.user, passwd=self.passwd,
                                 host=self.host, port=self.port,
                                 db=self.shdb, use_unicode=True)
            return db, db.cursor()
        except Exception:
            logger.error("Database connection error")
            raise
345928
def execute(self):
        
        from ambry.mprlib import execute_sql

        execute_sql(self._bundle.library, self.record_content)
640493
def cursor(self, offset=0, limit=None, order_by=None, as_dict=False):
        
        if offset and limit is None:
            raise DataJointError('limit is required when offset is set')
        sql = self.make_sql()
        if order_by is not None:
            sql += ' ORDER BY ' + ', '.join(order_by)
        if limit is not None:
            sql += ' LIMIT %d' % limit + (' OFFSET %d' % offset if offset else "")
        logger.debug(sql)
        return self.connection.query(sql, as_dict=as_dict)
1249456
def execute(self, conn, transaction=False):
        
        sql = self.sql
        binds = {}
        
	cursors = self.dbi.processData(sql, binds, conn, transaction, returnCursor=True)
        result = []
        for c in cursors:
            result.extend(self.formatCursor(c, size=100))
        return result
1345413
def db_exec(self, sql: str, *args) -> int:
        """"""
        self.ensure_db_open()
        cursor = self.db.cursor()
        return self.db_exec_with_cursor(cursor, sql, *args)
710246
def do_execute(self):
        
        iquery = InstanceQuery()
        iquery.db_url = str(self.resolve_option("db_url"))
        iquery.user = str(self.resolve_option("user"))
        iquery.password = str(self.resolve_option("password"))
        props = str(self.resolve_option("custom_props"))
        if (len(props) > 0) and os.path.isfile(props):
            iquery.custom_properties = props
        iquery.query = str(self.resolve_option("query"))
        data = iquery.retrieve_instances()
        self._output.append(Token(data))
        return None
791485
def _executing(self, sql, params=[]):
        
        with self.connection() as connection:
            for row in connection.execute(sql, params):
                yield row
                if not self._db:
                    return
837205
def execute(self, **kwargs):
    
    assert self.resp is None, "Transaction already committed"
    try:
      self.resp = self.db.tx(list(self.edn_iter), **kwargs)
    except Exception:
      self.resp = False
      raise
    else:
      self.resolve()
      self.adds = None
      self.tmpents = None
    return self.resp
609804
def _fetch(self, statement, commit, max_attempts=5):
        
        if self._auto_reconnect:
            attempts = 0
            while attempts < max_attempts:
                try:
                    # Execute statement
                    self._cursor.execute(statement)
                    fetch = self._cursor.fetchall()
                    rows = self._fetch_rows(fetch)
                    if commit:
                        self._commit()

                    # Return a single item if the list only has one item
                    return rows[0] if len(rows) == 1 else rows
                except Exception as e:
                    if attempts >= max_attempts:
                        raise e
                    else:
                        attempts += 1
                        self.reconnect()
                        continue
        else:
            # Execute statement
            self._cursor.execute(statement)
            fetch = self._cursor.fetchall()
            rows = self._fetch_rows(fetch)
            if commit:
                self._commit()

            # Return a single item if the list only has one item
            return rows[0] if len(rows) == 1 else rows
886584
public function execute()
    {
        if ($this->cursor) {
            return $this;
        }

        $this->db->execute();

        $this->cursor = $this->db->getCursor();

        return $this;
    }