(self, curs, new_seq_name = None)
return sql
Generate creation SQL.
Generate creation SQL.
Generate creation SQL .
def get_create_sql(self, curs, new_seq_name = None):
        """Generate creation SQL."""

        # we are in table def, forget full def
        if self.owner:
            sql = "ALTER SEQUENCE %s\n  OWNED BY %s;" % (
                    quote_fqident(self.name), self.owner )
            return sql

        name = self.name
        if new_seq_name:
            name = new_seq_name
        sql = 'CREATE SEQUENCE %s %s;' % (quote_fqident(name), self.defn)
        return sql
def get_create_sql ( self , curs , new_seq_name = None ) : # we are in table def, forget full def if self . owner : sql = "ALTER SEQUENCE %s\n  OWNED BY %s;" % ( quote_fqident ( self . name ) , self . owner ) return sql name = self . name if new_seq_name : name = new_seq_name sql = 'CREATE SEQUENCE %s %s;' % ( quote_fqident ( name ) , self . defn ) return sql