How to use the cog.parser.AddIndex function in cog

To help you get started, we’ve selected a few cog examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github arun1729 / cog / cog / parser.py View on Github external
def process_index_statement(index_statement):
    m = re.match(add_index_pattern, index_statement)
    meta = m.groupdict()
    print meta
    keys = []
    for k in meta["keys"].strip().split(","):
        keys.append(k.strip())
    return AddIndex(meta["tablename"], keys)