cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Donald Ball <ba...@webslingerZ.com>
Subject [c2] patch for database actions
Date Thu, 17 May 2001 18:54:11 GMT
attached is a patch for the database actions to allow the database add
action to add multiple rows to multiple tables from one form of values. a
sample form descriptor is:

<map>
  <connection>test</connection>
  <table name="product_table">
    <keys>
      <key param="id" dbcol="id" type="int" mode="form"/>
    </keys>
    <values>
      <value param="name" dbcol="name" type="string"/>
    </values>
  </table>
  <table name="product_meta_element_table">
    <keys>
      <key param="id" dbcol="product_id" type="int" mode="form"/>
      <key param="product_meta_element_name_*_param" dbcol="name" type="string" mode="form"/>
    </keys>
    <values>
      <value param="product_meta_element_value_*_param" dbcol="value" type="string"/>
    </values>
  </table>
</map:

note that all of a table's keys must be mode="form" if you're adding many
rows to the same table, or if the same new key value is used in multiple
tables. i'm gonna be fixing that. anyway, it's a pretty sizable patch so i
thought i'd flip it out for y'all to peruse before i committed it. if
berin doesn't want this added to the main action set i'm happy to commit
it as a new action.

- donald

Mime
View raw message