INNER CODE UNIT · Python

_sql_trace

probcomp/bayeslite · shell/src/core.py:393

    def _sql_trace(self, q, b):
        self.stdout.write('==> %s %s\n' % (q.strip(), b))

    def dot_trace(self, line):
        '''trace queries
        [bql|sql]

        Trace BQL or SQL queries executed in the database.
        Use `.untrace' to undo.
        '''
        if line == 'bql':
            if not self._traced:
                self._bdb.trace(self._trace)
                self._traced = True
        elif line == 'sql':
            if not self._sql_traced:
                self._bdb.sql_trace(self._sql_trace)
                self._sql_traced = True

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…