ó
7Þ	Pc           @   s   d  „  Z  d S(   c         c   s…  |  j  ƒ  } d Vd } | j | ƒ } x| j ƒ  D]\ } } } | d k rV d Vn2 | d k rj d Vn | j d ƒ r q3 n	 d | V| j d	 | ƒ } g  | j ƒ  D] } t | d
 ƒ ^ q¨ }	 d } | d j g  |	 D] }
 d |
 d ^ qÚ ƒ 7} | d 7} | j | i | d 6ƒ } x | D] } d | d Vq#Wq3 Wd } | j | ƒ } x& | j ƒ  D] \ } } } d | Vq`Wd Vd S(   s/  
    Returns an iterator to the dump of the database in an SQL text format.

    Used to produce an SQL dump of the database.  Useful to save an in-memory
    database for later restoration.  This function should not be called
    directly but instead called from the Connection method, iterdump().
    s   BEGIN TRANSACTION;s‚   
        SELECT name, type, sql
        FROM sqlite_master
            WHERE sql NOT NULL AND
            type == 'table'
        t   sqlite_sequences   DELETE FROM sqlite_sequence;t   sqlite_stat1s   ANALYZE sqlite_master;t   sqlite_s   %s;s   PRAGMA table_info('%s')i   s*   SELECT 'INSERT INTO "%(tbl_name)s" VALUES(t   ,s	   '||quote(s   )||'s   )' FROM '%(tbl_name)s't   tbl_namei    s—   
        SELECT name, type, sql
        FROM sqlite_master
            WHERE sql NOT NULL AND
            type IN ('index', 'trigger', 'view')
        s   COMMIT;N(   t   cursort   executet   fetchallt
   startswitht   strt   join(   t
   connectiont   cut   qt
   schema_rest
   table_namet   typet   sqlt   rest
   table_infot   column_namest   colt	   query_rest   rowt   name(    (    s"   /usr/lib/python2.7/sqlite3/dump.pyt	   _iterdump   s2    	
	).
N(   R   (    (    (    s"   /usr/lib/python2.7/sqlite3/dump.pyt   <module>   s    