More infos about insert which calls ODCIIndexInsert?
I'd like to insert a picture in my table (obj_id, filename, blob, feature_vector) with an own index on the obj_id implemented with the Extensible Indexing Interface.
When a new picture will be inserted into the table, the ODCIIndexInsert should calculate the feature vector, so I need the filename in the function ODCIIndexInsert to read the picture. But in the ODCIIndexInsert I only get the obj_id because the index is on the obj_id column.
How do I get more information on the insert statement? Can I modify the insert statement in the ODCIIndexInsert function?
Does anyone has experience in the Extensible Indexing Interface or can give me useful links?
Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.
No, ODCIIndexInsert() is called from the dbms because of an insert into the indexed column (obj_id).
My idea now is, that a before-insert-trigger will calculate the feature vector and writes the row to a temp. table. ODCIIndexInsert() reads the feature vector from temp table and inserts this object into the index table (its a relational m-tree table). After that a after-insert-trigger deletes the row from the temp table.
I thought, that everything can be done by ODCIIndexInsert(), but I think its not possible. The idea above can probably solve the problem, but it sounds like a dirty solution, not very elegant. Or what do you think?