andrii0lomakin / orientdb

OrientDB is the most versatile DBMS supporting Graph, Document, Reactive, Full-Text and Geospatial models in one Multi-Model product. OrientDB can run distributed (Multi-Master), supports SQL, ACID Transactions, Full-Text indexing and Reactive Queries.
http://orientdb.org
Apache License 2.0
0 stars 0 forks source link

New SQL engine does not filter hashmaps #114

Open andrii0lomakin opened 5 months ago

andrii0lomakin commented 5 months ago

In the expression like select from Profile where customReferences CONTAINSVALUE (name like 'Ja%') or select from Profile where customReferences[second]['name'] like 'Ja%' or select customReferences['second', 'first'] from Profile where customReferences.size() = 2 where

    customReferences.put("first", new ODocument("name", "Luca", "surname", "Garulli"));
    customReferences.put("second", new ODocument("name", "Jay", "surname", "Miner"));

    ODocument doc = new ODocument("Profile");
    doc.field("customReferences", customReferences, OType.EMBEDDEDMAP);

Condition in parentheses is applied to the currently processed record instead of hash map.

andrii0lomakin commented 5 months ago

More examples of queries:

select customReferences['second']['name'] from Profile where customReferences[second]['name'] is not null;
select customReferences['second']['name'] as value from Profile where customReferences[second]['name'] is not null