1 2 3 4 5 6 7 8 9
def byValues(value): if value[0] == '0': # by id return '`id` = %s' % value[1:] else: connection = core.db.getConnection() position = value.find('.') if position != -1: pass return '`name` = %s' % connection.literal(value)