C++ API for JSONiq

Bug #918164 reported by Chris Hillery
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Released
Critical
Ghislain Fourny

Bug Description

To at least include punching new store::Item methods through the zorba::Item API.

Tags: task

Related branches

Chris Hillery (ceejatec)
Changed in zorba:
assignee: nobody → Chris Hillery (ceejatec)
milestone: none → 3.0
importance: Undecided → High
status: New → Confirmed
Revision history for this message
Chris Hillery (ceejatec) wrote :

I believe all necessary work has been done on the JSONiq branch already: at least the methods isJSONItem(), getJSONItemKind(), getObjectPairs(), getArrayMembers(), getObjectValue(), getArrayMember(), getPairName(), and getPairValue() are exposed on zorba::Item. Some of these methods may need to be changed/renamed/revisited depending on the final decision about whether "pairs" are a first-class type or not.

Revision history for this message
Chris Hillery (ceejatec) wrote :

Indeed the internal store API has not been updated to reflect the latest JSONiq spec; it still has methods for dealing with pairs and still has a "pair" Item. The public Zorba API reflects some of the same issues. According to Markos it is not intended that the internal store API will be corrected anytime soon.

On the conf call on 4/18/2012, we decided that for 2.5, I will simply remove the public API methods that reference pairs, leaving the API incomplete but at least not incorrect. Based on that, I have removed the methods getObjectPairs(), getObjectValue(), getPairName(), and getPairValue().

However, include/zorba/store_consts.h has an enum JSONItemKind which is used both internally and externally. One of the values in this enum is "jsonPair". This cannot be removed without fixing the internal store API.

Revision history for this message
Chris Hillery (ceejatec) wrote :

Edit to above: I have not removed getObjectValue() as it does not actually do anything with pairs. I have updated the documentation for this method to make it more clear. I did also have to remove one existing JSONiq test case.

Changed in zorba:
status: Confirmed → New
milestone: none → 2.7
assignee: Chris Hillery (ceejatec) → Ghislain Fourny (gislenius)
importance: High → Critical
Revision history for this message
Chris Hillery (ceejatec) wrote :

The "wrong" external C++ methods have been removed. Once Ghislain changes the store implementation internally to get rid of pairs, we should revisit the public API and see if any item-level methods should be made part of the public API.

And don't forget to remove jsonPair from enum JSONItemKind!

Chris Hillery (ceejatec)
tags: added: task
Changed in zorba:
status: New → In Progress
Changed in zorba:
status: In Progress → Fix Committed
Changed in zorba:
status: Fix Committed → Fix Released
milestone: 2.7 → 2.6
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.