document update timestamp?

Friday, 22 November 2013 · 2 messages · last reply 24 Nov 2013
PH
Pascal Heus22 Nov 2013 00:37 #
Is there any way to retrieve the date/time a document was pushed into a BaseX database? We have an external tool that needs to sync a folder holding XML files with a BaseX database (and we don't want to reload the entire content each time). Not an issue for new or deleted files but would like to be able to determine if a file/document in the DB is outdated. Note that a db/folder 'sync' feature could be nice to have as built-in feature. Thanks! *P
CG
Christian Grün24 Nov 2013 19:08 #
Hi Pascal,
Quoted text · Pascal Heus · 2 lines
> Is there any way to retrieve the date/time a document was pushed into a > BaseX database?
Currently, no timestamp is stored for each single document.
Quoted text · Pascal Heus · 6 lines
> We have an external tool that needs to sync a folder > holding XML files with a BaseX database (and we don't want to reload the > entire content each time). Not an issue for new or deleted files but > would like to be able to determine if a file/document in the DB is > outdated. Note that a db/folder 'sync' feature could be nice to have as > built-in feature.
Yes, we already discussed about such a feature. With Java 7 (which provides the WatchService API [1]), it may be relatively easy to realize, either within BaseX, or as plugin, which could pass on updates to the database server. Contributions are welcome ;) Christian [1] http://docs.oracle.com/javase/tutorial/essential/io/notification.html

⚡Generated with XQuery