#NEWLINE# def fetch( db = None , sql = None ) : #NEWLINE# #INDENT# "\n    Retrieve data from an sqlite3 db (returns all rows, be careful!)\n\n    CLI Example:\n\n    .. code-block:: bash\n\n        salt '*' sqlite3.fetch /root/test.db 'SELECT * FROM test;'\n    " #NEWLINE# cur = _connect ( db ) #NEWLINE# if ( not cur ) : #NEWLINE# #INDENT# return False #NEWLINE# #UNINDENT# cur . execute ( sql ) #NEWLINE# rows = cur . fetchall ( ) #NEWLINE# return sql