'Extend a string-type declaration with standard SQL
COLLATE annotations and Drizzle specific extensions.'

def _extend_string(self, type_, defaults, spec):

    def attr(name):
        return getattr(type_, name, defaults.get(name))
    if attr('collation'):
        collation = ('COLLATE    %s' % type_.collation)
    elif attr('binary'):
        collation = 'BINARY'
    else:
        collation = None
    return '    '.join([c for c in (spec, collation) if (c is not None)])
