Is it possible to truncate a JChem enabled table?

User 0908c5ccdd

08-11-2007 09:44:16

Attempting to truncate a JChem enabled table I received the following error message:





Code:
ERROR at line 1:


ORA-29925: cannot execute JCHEM.JC_IDXTYPE_IM.ODCIINDEXTRUNCATE






Is this expected or am I doing something silly?

ChemAxon aa7c50abf8

08-11-2007 11:14:04

You do the right thing. It's just that this table operation is not yet supported by JChem Cartridge. I have created a task to implement this support.





Thanks


Peter





PS:


As a general rule, you should not use direct database functions for DML operations on JChem structure tables. This applies to both JChem Base use and JChem Cartridge.





While this general rule holds for table truncation in the case of JChem Base. JChem Cartridge (once proper support for truncation will be in place) will be an exception:





Truncating a table is basically a "bulk delete" operation. The problem with direct manipulation is that the structure cache will not be updated and the deleted structures will still be in the cache and will be included in the search -- if you use only JChem Base.





However, if there will be a jc_idxtype index on the JChem structure table, JChem Cartridge will be able to take care of structure cache update mechanism, because it gets notifications from Oracle of direct database operations for the purpose of maintaining the index data accordingly, JChem Base (i.e. a JChem structure table without jc_idxtype domain index) doesn't have this kind of hook from Oracle -- and no-one will take care of the structure cache update.





Note that jc_insert/jc_update/jc_delete still must be used with JChem Cartridge due to other technical reasons for DML operations. The only exception from the dont-do-direct-dml-on-jchem-tables will be truncation.