Hi Martyn
Have you considered coercing the both sides of the WHERE expression to upper or lower case using the GSQL upper(string) or lower(string) function
https://docs.tigergraph.com/dev/gsql-ref/querying/operators-functions-and-expressions see String functions
Steve
--
Welcome to GSQL-user group.
- our mission is bringing the power of graph databases to everyone
www.opengsql.org
- technical resource can be found here
https://docs.tigergraph.com/
---
You received this message because you are subscribed to the Google Groups "gsql-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
gsql-users+...@opengsql.org.
To view this discussion on the web visit
https://groups.google.com/a/opengsql.org/d/msgid/gsql-users/5702406e-f580-4d25-9355-6a237817a0b4%40opengsql.org.
To unsubscribe from this group and stop receiving emails from it, send an email to gsql-...@opengsql.org.
DROP ALLCREATE VERTEX Person (PRIMARY_ID id INT, name STRING, age INT)CREATE GRAPH MyGraph (*)
1,Thorin,1952,Fili,823,Kili,774,Oín,1675,Glóin,1586,Balin,1787,Dwalin,1698,Ori,769,Dori,11410,Nori,10411,Bifur,12712,Bofur,9813,Bombur,10714,Bilbo,5015,Gandalf,5000
CREATE QUERY getAllPeopleByKeyword(STRING keyword) FOR GRAPH MyGraph {
STRING name = ""; STRING wildcard = "%"; name = wildcard + lower(keyword) + wildcard;
arrPeople = {Person.*}; # initialized with all vertices of type 'people'
arrPeopleFiltered = SELECT v FROM arrPeople:v WHERE lower(v.name) LIKE name;
PRINT arrPeopleFiltered;}
GSQL > RUN QUERY getAllPeopleByKeyword("LI")
{
"error": false,
"message": "",
"version": {
"schema": 0,
"edition": "enterprise",
"api": "v2"
},
"results": [{"arrPeopleFiltered": [
{
"v_id": "2",
"attributes": {
"name": "Fili",
"age": 82
},
"v_type": "Person"
},
{
"v_id": "6",
"attributes": {
"name": "Balin",
"age": 178
},
"v_type": "Person"
},
{
"v_id": "3",
"attributes": {
"name": "Kili",
"age": 77
},
"v_type": "Person"
},
{
"v_id": "7",
"attributes": {
"name": "Dwalin",
"age": 169
},
"v_type": "Person"
}
]}]
}
GSQL > RUN QUERY getAllPeopleByKeyword("li")
{
"error": false,
"message": "",
"version": {
"schema": 0,
"edition": "enterprise",
"api": "v2"
},
"results": [{"arrPeopleFiltered": [
{
"v_id": "2",
"attributes": {
"name": "Fili",
"age": 82
},
"v_type": "Person"
},
{
"v_id": "6",
"attributes": {
"name": "Balin",
"age": 178
},
"v_type": "Person"
},
{
"v_id": "3",
"attributes": {
"name": "Kili",
"age": 77
},
"v_type": "Person"
},
{
"v_id": "7",
"attributes": {
"name": "Dwalin",
"age": 169
},
"v_type": "Person"
}
]}]