age icon indicating copy to clipboard operation
age copied to clipboard

Since there seems to be special requirements for label name, it would be nice to extend a function to verify name correctness

Open MironAtHome opened this issue 1 year ago • 3 comments

I am currently about to convert large set of semi - structured data saved in files into somewhat winning combination of flexible data structure and yet stable enough reporting architecture. However, I am running into naming convention conflicts between how files named shards of information and what label name Age graph database can support. Rather than having hundreds of failures, during "create" function call, it would make sense if same function(s) used to validate label name internally and produce an error message "ERROR: label name is invalid " had a function that verifies name and produces boolean output, to inform myself, that I need to add additional name transcription step in function that normalizes file content naming towards graph database labels. It would also be very nice if age extended some kind of standardized v_label_name(?) normalization function. Though postgres native quote_ident is not par, but it's something to have in mind, as an idea. Something like this

age_quote_ident('AgeIdentityName') age_normalize_ident('AgeUnfriendlyIdentityName#') age_verify_ident('AgeUnfriendlyIdentityName#')

I would like to take an escape clause, the above is not an intent or ask. Just laying out where I am at and asking for an eye to look and weight what is the most appropriate step. It would make sense to add tooling, if team wishes to keep naming of label's the way it is, or, if team so plans ahead, make label name aligned with general postgres identity naming convention. Either approach is equally great on my mind.

MironAtHome avatar Jun 13 '24 20:06 MironAtHome

@MironAtHome That should be easy to add.

jrgemignani avatar Jun 13 '24 20:06 jrgemignani

@MironAtHome This is pending review of #1912, but will add that functionality.

jrgemignani avatar Jun 13 '24 21:06 jrgemignani

@MironAtHome This change is in the master branch, pending reviews for the lower branches.

I should point out that the graph and label names follow the standards set by Neo4j.

jrgemignani avatar Jun 15 '24 00:06 jrgemignani