+ print '''
+void
+%(s)s_delete(const struct %(s)s *row)
+{
+ ovsdb_idl_txn_delete(&row->header_);
+}
+
+struct %(s)s *
+%(s)s_insert(struct ovsdb_idl_txn *txn)
+{
+ return %(s)s_cast(ovsdb_idl_txn_insert(txn, &%(p)stable_classes[%(P)sTABLE_%(T)s], NULL));
+}
+''' % {'s': structName,
+ 'p': prefix,
+ 'P': prefix.upper(),
+ 'T': tableName.upper()}
+
+ # Verify functions.
+ for columnName, column in sorted(table.columns.iteritems()):
+ print '''
+void
+%(s)s_verify_%(c)s(const struct %(s)s *row)
+{
+ assert(inited);
+ ovsdb_idl_txn_verify(&row->header_, &%(s)s_columns[%(S)s_COL_%(C)s]);
+}''' % {'s': structName,
+ 'S': structName.upper(),
+ 'c': columnName,
+ 'C': columnName.upper()}
+
+ # Get functions.
+ for columnName, column in sorted(table.columns.iteritems()):
+ if column.type.value:
+ valueParam = ',\n\tenum ovsdb_atomic_type value_type OVS_UNUSED'
+ valueType = '\n assert(value_type == %s);' % column.type.value.toAtomicType()
+ valueComment = "\n * 'value_type' must be %s." % column.type.value.toAtomicType()
+ else:
+ valueParam = ''
+ valueType = ''
+ valueComment = ''
+ print """
+/* Returns the %(c)s column's value in 'row' as a struct ovsdb_datum.
+ * This is useful occasionally: for example, ovsdb_datum_find_key() is an
+ * easier and more efficient way to search for a given key than implementing
+ * the same operation on the "cooked" form in 'row'.
+ *
+ * 'key_type' must be %(kt)s.%(vc)s
+ * (This helps to avoid silent bugs if someone changes %(c)s's
+ * type without updating the caller.)
+ *
+ * The caller must not modify or free the returned value.
+ *
+ * Various kinds of changes can invalidate the returned value: modifying
+ * 'column' within 'row', deleting 'row', or completing an ongoing transaction.
+ * If the returned value is needed for a long time, it is best to make a copy
+ * of it with ovsdb_datum_clone(). */
+const struct ovsdb_datum *
+%(s)s_get_%(c)s(const struct %(s)s *row,
+\tenum ovsdb_atomic_type key_type OVS_UNUSED%(v)s)
+{
+ assert(key_type == %(kt)s);%(vt)s
+ return ovsdb_idl_read(&row->header_, &%(s)s_col_%(c)s);
+}""" % {'s': structName, 'c': columnName,
+ 'kt': column.type.key.toAtomicType(),
+ 'v': valueParam, 'vt': valueType, 'vc': valueComment}
+
+ # Set functions.
+ for columnName, column in sorted(table.columns.iteritems()):