(self)
return '\n'.join(lines)
Convert container to SQL meta-comments.
Convert container to SQL meta-comments.
Convert container to SQL meta - comments .
def to_sql(self):
        """Convert container to SQL meta-comments."""
        lines = []
        for m in META_MATCHERS:
            k = m.get_key()
            if k not in self.attrs:
                continue
            vlist = self.attrs[k]
            ln = "%s %s: " % (META_PREFIX, m.nice_name)
            start = 0
            for nr, v in enumerate(vlist):
                if nr > start:
                    ln = ln + ", " + v
                else:
                    ln = ln + v

                if len(ln) >= META_SPLITLINE and nr < len(vlist) - 1:
                    ln += ','
                    lines.append(ln)
                    ln = META_PREFIX + "     "
                    start = nr + 1
            lines.append(ln)
        return '\n'.join(lines)
def to_sql ( self ) : lines = [ ] for m in META_MATCHERS : k = m . get_key ( ) if k not in self . attrs : continue vlist = self . attrs [ k ] ln = "%s %s: " % ( META_PREFIX , m . nice_name ) start = 0 for nr , v in enumerate ( vlist ) : if nr > start : ln = ln + ", " + v else : ln = ln + v if len ( ln ) >= META_SPLITLINE and nr < len ( vlist ) - 1 : ln += ',' lines . append ( ln ) ln = META_PREFIX + "     " start = nr + 1 lines . append ( ln ) return '\n' . join ( lines )