Hi Christian,
Adding a flag would be great , this will helps out so that we can sync database changes into xml file in one call.
I have one more question:
We are getting the following exception while performing query against database : Main.notexpected(Object...) line: 205 TableDiskAccess.cursor(int) line: 326 TableDiskAccess.read1(int, int) line: 95 DiskData(Data).kind(int) line: 277 DBNode$3.next() line: 234 SimpleIterStep$1.next() line: 51 AxisPath.iter(int, NodIter, QueryContext) line: 425 AxisPath.iter(int, NodIter, QueryContext) line: 428 AxisPath.iter(int, NodIter, QueryContext) line: 428 AxisPath.iter(int, NodIter, QueryContext) line: 428 AxisPath.iter(QueryContext) line: 398 QueryContext.iter(Expr) line: 338 QueryContext.iter() line: 296 QueryContext.eval() line: 255 QueryProcessor.query() line: 92 BXQueryService.query(Nodes, String) line: 121 BXQueryService.query(String) line: 69 BXQueryService.query(String) line: 1
Can you shade some light why would this happen ? this problem happens randomly.
We currently create a single Context object for every open database and keep passing this context for every call, do you think this will cause the problem ?
Thank you!!!
--Aleks
-----Original Message----- From: Christian GrĂ¼n [mailto:christian.gruen@gmail.com] Sent: Wednesday, January 27, 2010 8:13 AM To: Alexander Sheynkman Cc: basex-talk@mailman.uni-konstanz.de Subject: Re: [basex-talk] BaseX db questions
Hi Aleks,
- XSD validation, currently BaseX does not provide any good way to perform XSD validation and all writes are always flushed to the disk. This will potentially can cause a problem, because incorrect changes can break consistency of the database. In addition to this it's a bit heavy to keep complete xml in the memory just for the purpose of validation due to the fact that database can grow to a large size.
It's true we don't offer schema validation, so documents won't be automatically revalidated after updates. I.e., the application must guarantee that updates won't violate the schema.
- Currently all writes to database only reflect in internal BaseX file system, the changes does not apply to XML file right away, unless you specifically copy it over, is there are a good way where you can force BaseX also update xml file with the changes.
Currently, this has to be done by explicitly calling the fn:put() function or using the export command. But let me think.. We could add a new database flag to automatically write changes back to the original files. This flag could be switched on by default. Just tell me if this would be helpful in your context (note, however, that we'll have to check this solution for potential side effects).
Hope this helps, Christian