Exemplo n.º 1
0
               {"field1":"Test Value 5", "field2":500, "field3":"something 5"},
               {"field1":"Test Value 6", "field2":600, "field3":"something 6"}]

sq1.writeMany(many_writes)

cond = C.Or(
            C.And(
             C._("field2", ">", 200),
             C._("field2", "<", 600)
             ),
            C._("field1", "=", "Test Value 2")
            )

sq1.search(cond)

result = sq1.read()

if len(result) != 4:
    print("ERROR: either rows where not added or searcg doesn't work")
    
print ("Test of value: " + result[0]["field1"])

sq1.deleteOne(2)

sq1.search(C._("id", "=", 2))

result = sq1.read()

if result:
    print ("ERROR: Could not remove the row.")