Ejemplo n.º 1
0
def keywords_cases(keywords):
	keywords = keywords.split(',')
	query_str = query_str_start() + 'WHERE '
	for keyword in keywords:
		query_str += '"' + keyword + '" IN case.keywords AND '
	query_str += '1 = 1' + query_str_end()
	return form_json(query_db(query_str))
Ejemplo n.º 2
0
def keywords_cases(keywords):
    keywords = keywords.split(',')
    query_str = query_str_start() + 'WHERE '
    for keyword in keywords:
        query_str += '"' + keyword + '" IN case.keywords AND '
    query_str += '1 = 1' + query_str_end()
    return form_json(query_db(query_str))
Ejemplo n.º 3
0
def appeal(reference_p1, reference_p2, reference_p3):
	reference_p1 = str(reference_p1)
	reference_p2 = str(reference_p2)
	reference_p3 = str(reference_p3)
	query_str = query_str_start(True) + 'WHERE appeal.reference = "' + reference_p1 + '/' + reference_p2 + '/' + reference_p3 + '"' + query_str_end(True) + ' LIMIT 1'
	result = query_db(query_str)
	return form_json(result)
Ejemplo n.º 4
0
def case(reference_p1, reference_p2):
    reference_p1 = str(reference_p1)
    reference_p2 = str(reference_p2)
    query_str = query_str_start(
    ) + 'WHERE case.reference = "' + reference_p1 + '/' + reference_p2 + '"' + query_str_end(
    ) + ' LIMIT 1'
    result = query_db(query_str)
    return form_json(result)
Ejemplo n.º 5
0
def appeal(reference_p1, reference_p2, reference_p3):
    reference_p1 = str(reference_p1)
    reference_p2 = str(reference_p2)
    reference_p3 = str(reference_p3)
    query_str = query_str_start(
        True
    ) + 'WHERE appeal.reference = "' + reference_p1 + '/' + reference_p2 + '/' + reference_p3 + '"' + query_str_end(
        True) + ' LIMIT 1'
    result = query_db(query_str)
    return form_json(result)
Ejemplo n.º 6
0
def cases():
	args = request.args

	return form_json(advanced_cases_query(d_surname=args.get('d_surname'),
		d_name=args.get('d_name'),
		p_surname=args.get('p_surname'),
		p_name=args.get('p_name'),
		d_org=args.get('d_org'),
		p_org=args.get('p_org'),
		date=args.get('date'),
		keywords=args.get('keywords'),
		reference=args.get('reference'),
		appeals=args.get('appeals')))
Ejemplo n.º 7
0
def cases():
    args = request.args

    return form_json(
        advanced_cases_query(d_surname=args.get('d_surname'),
                             d_name=args.get('d_name'),
                             p_surname=args.get('p_surname'),
                             p_name=args.get('p_name'),
                             d_org=args.get('d_org'),
                             p_org=args.get('p_org'),
                             date=args.get('date'),
                             keywords=args.get('keywords'),
                             reference=args.get('reference'),
                             appeals=args.get('appeals')))
Ejemplo n.º 8
0
def party_cases():
	surname = request.args.get('surname')
	name = request.args.get('name')

	return form_json(query_cases_by_party(name, surname))
Ejemplo n.º 9
0
def party_surname_name_cases(surname, name):
	return form_json(query_cases_by_party(name, surname))
Ejemplo n.º 10
0
def appeals_by_case_reference(reference_p1, reference_p2):
	query_str = query_str_start(True) + 'WHERE case.reference = "' + str(reference_p1) + '/' + str(reference_p2) + '"' + query_str_end(True) + ' LIMIT 1'
	result = query_db(query_str)
	return form_json(result)
Ejemplo n.º 11
0
def appeals():
	result = query_db(query_str_start(True) + query_str_end(True))
	return form_json(result)
Ejemplo n.º 12
0
def date_cases(date):
	query_str = query_str_start() + 'WHERE case.date = "' + date + '"' + query_str_end()
	result = query_db(query_str)
	return form_json(result)
Ejemplo n.º 13
0
def case(reference_p1, reference_p2):
	reference_p1 = str(reference_p1)
	reference_p2 = str(reference_p2)
	query_str = query_str_start() + 'WHERE case.reference = "' + reference_p1 + '/' + reference_p2 + '"' + query_str_end() + ' LIMIT 1'
	result = query_db(query_str)
	return form_json(result)
Ejemplo n.º 14
0
def party_cases():
    surname = request.args.get('surname')
    name = request.args.get('name')

    return form_json(query_cases_by_party(name, surname))
Ejemplo n.º 15
0
def party_surname_name_cases(surname, name):
    return form_json(query_cases_by_party(name, surname))
Ejemplo n.º 16
0
def appeals_by_case_reference(reference_p1, reference_p2):
    query_str = query_str_start(True) + 'WHERE case.reference = "' + str(
        reference_p1) + '/' + str(reference_p2) + '"' + query_str_end(
            True) + ' LIMIT 1'
    result = query_db(query_str)
    return form_json(result)
Ejemplo n.º 17
0
def appeals():
    result = query_db(query_str_start(True) + query_str_end(True))
    return form_json(result)
Ejemplo n.º 18
0
def date_cases(date):
    query_str = query_str_start(
    ) + 'WHERE case.date = "' + date + '"' + query_str_end()
    result = query_db(query_str)
    return form_json(result)