Opened 15 years ago

Closed 10 years ago

#3125 closed enhancement (wontfix)

[] add Versioning API

Reported by: skinner Owned by: skinner
Priority: low Milestone: future
Component: Data Version: 0.9
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by kriszyp)

Sometime in the future, when we have more time, we should consider adding a Versioning API.

Here's some brainstorming about what might look like:

	//	summary:
	//		This is an abstract API that data provider implementations conform to.
	//		This file defines methods signatures and intentionally leaves all the
	//		methods unimplemented.

	getFeatures: function(){
		//	summary: 
		//		See
		return {
			 '': true,
			 '': true

	useVersion: function(/* int */ versionNumber){
		//	summary:
		//		Sets the datastore so that all the Read API methods will return
		//		item values as they were at the time of the given version.
		//	returns:
		//		Returns true if the given version number exists and the datastore
		//		is able to return results about items from that version.
		//	examples:
		//		store.useVersion(0);
		//		var lukeSkywalker = store.getItemByIdentity("luke");
		//		var unknown = store.getValue(lukeSkywalker, "father");
		//		store.useVersion(3);
		//		var lukeSkywalker = store.getItemByIdentity("luke");
		//		var darthVader = store.getValue(lukeSkywalker, "father");
		return false; // boolean

	getVersionData: function(/* int */ versionNumber){
		//	summary:
		//		Given a version number, returns an object with information
		//		about that version of the data in the datastore -- the version
		//		info might include the time the version was saved, the user
		//		who created the version, or other information.
		//	examples:
		//		var version = store.getVersionData(32);
		//		var date = version["createdAtTime"];
		//		var user = version["createdByUser"];
		return versionObject; // Object

	getLastVersionNumber: function(){
		//	summary:
		//		Returns the version number for the most recent version of the
		//		data.
		//	examples:
		//		var lastVersionNumber = store.getLastVersionNumber();
		//		var lastVersionData = store.getVersionData(lastVersionNumber);
		//		var user = lastVersionData["createdByUser"];
		return number; // int


Change History (7)

comment:1 Changed 15 years ago by Adam Peller

Owner: changed from anonymous to skinner

comment:2 Changed 14 years ago by Adam Peller

Milestone: 1.02.0

comment:3 Changed 14 years ago by alex

Milestone: 2.01.3

Milestone 2.0 deleted

comment:4 Changed 14 years ago by kriszyp

Description: modified (diff)

I would like to implement this at some point, but shouldn't versioning be per item, instead per store? I would think users of a versioning API would want to go back to particular version of an item, not just have a single store version. Strangely the proposed Schema API is per item, and I would think that we would want just the opposite: per store schema info and per item versioning.

comment:5 Changed 13 years ago by bill

Milestone: 1.3future

comment:6 Changed 10 years ago by ben hockey

Keywords: needsreview added

adding needsreview keyword - does anyone have any intention of doing/owning this? is there a reason to keep the ticket open?

comment:7 Changed 10 years ago by bill

Keywords: needsreview removed
Resolution: wontfix
Status: newclosed

I agree with peller and neonstalwart, that since has been replaced by we should just close these tickets.

Note: See TracTickets for help on using tickets.