typhon-project / typhonql

Typhon Query Language
Eclipse Public License 2.0
4 stars 1 forks source link

[BUG] sql back-end will not accept bool value #95

Closed barmpis closed 4 years ago

barmpis commented 4 years ago

Describe the bug

When trying to initialise a polystore using a relational database with a field of type 'bool' we get a rascal error.

Query

Resetdatabases

Model

entity Datatypes {
    s : string
    i : int
    r : bigint
    f : float
    b : bool
    d : date
    timeStamp : datetime
    vehicle_position : point
    area : polygon
    ref -> Refer[1]
}
entity Refer {
    r : int
}
 relationaldb DatatypesDB {
    tables {
        table{
            DatatypesTable : Datatypes
            index dtIndex{
                attributes ('s')
            }
                idSpec ('s')
            }
        table{
            ReferTable : Refer
             index refIndex{
                attributes ('r')
            }
                idSpec ('r')
            }
    }
 }

Expected behavior

Resetdatabases should succeed.

Screenshots

n/a

IDE

n/a

REST API

false

Additional context

server logs:

typhonql-server_1 | Starting a fresh evaluator to interpret the query (17476ffe) typhonql-server_1 | Finished initializing evaluator: 17476ffe in 55132ms typhonql-server_1 | TyphonQL failed to handle request, msg: typhonql-server_1 | Unsupported Typhon type bool typhonql-server_1 | Trace: typhonql-server_1 | |lib://typhonql/src/lang/typhonql/relational/Util.rsc%7C(3369,2,<101,76>,<101,78>): "Unsupported Typhon type bool" typhonql-server_1 | at typhonType2SQL(|lib://typhonql/src/lang/typhonql/relational/Util.rsc%7C(3293,81,<101,0>,<101,81>))