示例#1
0
文件: sql.py 项目: viswajithiii/ringo
def select(table, condition=[], attributes=[], newnames=None):
    if len(attributes):
        attrIdx = table.getIndex(attributes)
        t = table.project(attrIdx)
    t = table.select(condition)
    if not newnames is None:
        t.setNames(newnames)
    return t
示例#2
0
文件: sql.py 项目: Peratham/ringo
def select(table, condition=[], attributes=[], newnames=None):
	if len(attributes):
		attrIdx = table.getIndex(attributes)
		t = table.project(attrIdx)
	t = table.select(condition)
	if not newnames is None:
		t.setNames(newnames)
	return t
示例#3
0
文件: sql.py 项目: viswajithiii/ringo
def project(table, attributes):
    attrIdx = table.getIndex(attributes)
    return table.project(attrIdx)
示例#4
0
文件: sql.py 项目: Peratham/ringo
def project(table, attributes):
	attrIdx = table.getIndex(attributes)
	return table.project(attrIdx)