(self, curs, new_table_name = None)
return rx_replace(rx, self.defn, pnew)
Generate creation SQL.
Generate creation SQL.
Generate creation SQL .
def get_create_sql(self, curs, new_table_name = None):
        """Generate creation SQL."""
        if not new_table_name:
            return self.defn

        # fixme: broken / quoting
        rx = r"\bON[ ][a-z0-9._]+[ ]"
        pnew = "ON %s " % new_table_name
        return rx_replace(rx, self.defn, pnew)
def get_create_sql ( self , curs , new_table_name = None ) : if not new_table_name : return self . defn # fixme: broken / quoting rx = r"\bON[ ][a-z0-9._]+[ ]" pnew = "ON %s " % new_table_name return rx_replace ( rx , self . defn , pnew )