Skip to content

Galois advertising gtable ddl file parser|gtable语法解析工具。将ddl文件和gql文件转化为xml文件供后续代码生成。

License

Notifications You must be signed in to change notification settings

galois-advertising/gtable-parser

Repository files navigation

what is gtable

gtable(GaloisTable) is a low-latency in-menory database engine implement by c++ for relational data storage especially for advertisement data. Support SQL like pre-compiled query language GQL. You can embed gtable into any c++ project.

what is gtable-parser

gtable-parser is a tool for translating *.ddl or *.gql file inito xml file. gtable-parser

install

Installation dependency:

$ git clone --recursive git@github.com:galois-advertising/gtable-parser.git
$ cd gtable-parser
$ python setup.py install

If fails, check your gcc version:

$ export CC=/opt/gcc720/bin/gcc && export CXX=/opt/gcc720/bin/g++

and re-run the commands above.

usage

import os
import sys
import gtableparser

with open("schema/Datatable.ddl", 'r') as f: 
    datatable = f.read()
p = gtableparser.ddlparser()
xml = p.parse(datatable)
print xml

with open("schema/SeekIndex.gql", 'r') as f: 
    seekindex = f.read()
p = gtableparser.gqlparser()
xml = p.parse(seekindex)
print xml

About

Galois advertising gtable ddl file parser|gtable语法解析工具。将ddl文件和gql文件转化为xml文件供后续代码生成。

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published