from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy import event

metadata = MetaData()

def _inspect_for_auditing(conn, cursor, statement, parameters, context, executemany):
    import pdb; pdb.set_trace()
    if statement and statement.lstrip()[:6].upper() == 'SELECT':
        # Allow any SELECTs, so we don't bother setting auditing variables unless
        # we need it.
        return
        

e = create_engine('oracle://kent:kent@localhost:1521/xe?use_ansi=False', echo=True)

import pdb; pdb.set_trace()

conn=e.connect()

event.listen(e, 'before_cursor_execute', _inspect_for_auditing)

conn.execute('SELECT * FROM user_tables')


#event.listen(conn, 'before_cursor_execute', _inspect_for_auditing)
conn._has_events = True

conn.execute('SELECT * FROM user_tables')



814b1f44730041f1faaf8be645cd2d06af1b020f
<mask token>


def _inspect_for_auditing(conn, cursor, statement, parameters, context,
    executemany):
    import pdb
    pdb.set_trace()
    if statement and statement.lstrip()[:6].upper() == 'SELECT':
        return


<mask token>

<mask token>


def _inspect_for_auditing(conn, cursor, statement, parameters, context,
    executemany):
    import pdb
    pdb.set_trace()
    if statement and statement.lstrip()[:6].upper() == 'SELECT':
        return


<mask token>
pdb.set_trace()
<mask token>
event.listen(e, 'before_cursor_execute', _inspect_for_auditing)
conn.execute('SELECT * FROM user_tables')
<mask token>
conn.execute('SELECT * FROM user_tables')

<mask token>
metadata = MetaData()


def _inspect_for_auditing(conn, cursor, statement, parameters, context,
    executemany):
    import pdb
    pdb.set_trace()
    if statement and statement.lstrip()[:6].upper() == 'SELECT':
        return


e = create_engine('oracle://kent:kent@localhost:1521/xe?use_ansi=False',
    echo=True)
<mask token>
pdb.set_trace()
conn = e.connect()
event.listen(e, 'before_cursor_execute', _inspect_for_auditing)
conn.execute('SELECT * FROM user_tables')
conn._has_events = True
conn.execute('SELECT * FROM user_tables')

from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy import event
metadata = MetaData()


def _inspect_for_auditing(conn, cursor, statement, parameters, context,
    executemany):
    import pdb
    pdb.set_trace()
    if statement and statement.lstrip()[:6].upper() == 'SELECT':
        return


e = create_engine('oracle://kent:kent@localhost:1521/xe?use_ansi=False',
    echo=True)
import pdb
pdb.set_trace()
conn = e.connect()
event.listen(e, 'before_cursor_execute', _inspect_for_auditing)
conn.execute('SELECT * FROM user_tables')
conn._has_events = True
conn.execute('SELECT * FROM user_tables')

from sqlalchemy import *
from sqlalchemy.orm import *
from sqlalchemy import event

metadata = MetaData()

def _inspect_for_auditing(conn, cursor, statement, parameters, context, executemany):
    import pdb; pdb.set_trace()
    if statement and statement.lstrip()[:6].upper() == 'SELECT':
        # Allow any SELECTs, so we don't bother setting auditing variables unless
        # we need it.
        return
        

e = create_engine('oracle://kent:kent@localhost:1521/xe?use_ansi=False', echo=True)

import pdb; pdb.set_trace()

conn=e.connect()

event.listen(e, 'before_cursor_execute', _inspect_for_auditing)

conn.execute('SELECT * FROM user_tables')


#event.listen(conn, 'before_cursor_execute', _inspect_for_auditing)
conn._has_events = True

conn.execute('SELECT * FROM user_tables')


