[MODCXMOCK-12] align with CQL schema Created: 02/Jan/18 Updated: 04/Jan/18 Resolved: 04/Jan/18 |
|
| Status: | Closed |
| Project: | mod-codex-mock |
| Components: | None |
| Affects versions: | None |
| Fix versions: | 1.0.2 |
| Type: | New Feature | Priority: | P3 |
| Reporter: | Jakub Skoczen | Assignee: | Heikki Levanto |
| Resolution: | Done | Votes: | 0 |
| Labels: | sprint29 | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | 1 day | ||
| Original estimate: | Not Specified | ||
| Issue links: |
|
||||||||
| Sprint: | |||||||||
| Description |
|
In the 'raml' repo. |
| Comments |
| Comment by Heikki Levanto [ 02/Jan/18 ] |
|
https://github.com/folio-org/raml/blob/master/schemas/codex/codex_instance_cqlschema.json |
| Comment by Heikki Levanto [ 03/Jan/18 ] |
|
Looks like I need to fix the following in the query:
Actually, the proper isbn query would be '(identifier=isbn and identifier=123456789)'. It is not perfect, but at least it will not find records that have the same identifier under some other type , but do not have an isbn at all. These are so small changes that I think it is easiest to do them with a simple string replacement, without |
| Comment by Jakub Skoczen [ 03/Jan/18 ] |
|
I doubt you can do this well with a simple string replacement (rather than walking the CQL parse tree). There are modifiers that need to be handler and index names that need to be mapped. |
| Comment by Heikki Levanto [ 03/Jan/18 ] |
|
As far as I can see, there are only those three I mentioned above, and they all are easy to handle with string replacements. Yes, there are pathological corner cases that will fail, like 'title=resourceType', but for the mock that will not matter so much I just heard from Adam that is it not so easy to traverse the parse tree and make modifications... |
| Comment by Jakub Skoczen [ 03/Jan/18 ] |
|
You can be sure more things are coming in the future versions of the codex and we will want flexibility first. But the choice is your, of course. |
| Comment by Heikki Levanto [ 03/Jan/18 ] |
|
I may switch to walking through the parse tree once we get setters in the nodes, so I can modify them on the fly. But for now, a few small regular expressions was so much easier. |
| Comment by Heikki Levanto [ 04/Jan/18 ] |
|
Fixed, merged into master |