This example maps a repository item to a single table row. It includes just a primary table, with no joins with other tables.
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <!DOCTYPE gsa-template PUBLIC "-//Art Technology Group, Inc.//DTD Dynamo Security//EN" "http://www.atg.com/dtds/gsa/gsa_1.0.dtd"> <gsa-template> <header> <name>Repository Example Version A</name> <author>Pat Durante</author> <description> This template maps a repository item to a single table row. Just a primary table...no joins with other tables. Simplest case. </description> </header> <item-descriptor name="user" default="true"> <table name="usr_tbl" type="primary" id-column-names="id"> <property name="id" data-type="string"/> <property name="name" column-names="nam_col" data-type="string"/> <property name="age" column-names="age_col" data-type="int"/> </table> </item-descriptor> </gsa-template>
SQL Statements
drop table usr_tbl; CREATE TABLE usr_tbl ( id VARCHAR(32) not null, nam_col VARCHAR(32) null, age_col INTEGER null, primary key(id) );