Ignore:
Timestamp:
Apr 19, 2016, 8:56:43 AM (7 years ago)
Author:
Nicklas Nordborg
Message:

References #2000: Batch API for annotation handling

First version of the new AnnotationBatcher implementation. It should have support for creating, updating and deleting annotation values.

It lacks a lot functionality:

  • It doesn't check annotation values (eg. if a String is a String, if a values is allowed by the an enumerated annotation, etc.)
  • It doesn't handle units
  • Changes are not recorded in the change log


The AnnotationFlatFileImporter has been modified to use the batcher. All possible options for updating are supported (eg. merge).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/config/dist/mysql-queries.xml

    r6981 r7121  
    3838  </query>
    3939
     40  <query id="AB_INSERT_INTO_ANNOTATIONS" type="SQL">
     41    <sql>
     42      INSERT INTO [Annotations] ([version], [annotationset_id], [annotationtype_id], [unit_id], [value_id], [last_update], [source])
     43      VALUES (0, ?, ?, ?, ?, ?, 0)
     44    </sql>
     45    <description>
     46      SQL query for inserting rows into the Annotations table.
     47      The primary key (id) must be auto-generated.
     48      Parameters: annotationset_id, annotationtype_id, unit_id, value_id, last_updated
     49    </description>
     50  </query>
     51 
     52  <query id="AB_INSERT_INTO_ANNOTATIONSETS" type="SQL">
     53    <sql>
     54      INSERT INTO [AnnotationSets] ([version], [item_type], [item_id])
     55      VALUES (0, {1}, ?)
     56    </sql>
     57    <description>
     58      SQL query for inserting rows into the AnnotationSets table.
     59      The primary key (id) must be auto-generated.
     60      Parameters: item_id
     61    </description>
     62  </query>
     63 
     64
     65
    4066</predefined-queries>
Note: See TracChangeset for help on using the changeset viewer.