If the table already exists in the database, use the Table tag to tell Arcos of its structure. If the table does not exist, use the Table tag to instruct Arcos to create the table.
Usage 1 (for Postgres, MySQL3, Oracle8 databases):
<Table IntTableName=value [DBTableName=value]>
Usage 2 (for database Type=NULL):
<Table IntTableName=value SourceFile=value BasedOnType=value>
IntTableName
The table name used by Arcos. Use any name that is convenient for you. The name does not need to be the same as the table name known to the database application.
DBTableName
The name of the table in the database.
There is a shortcut that you can use, but be careful! If you want the Arcos table name to be the same as the table name in the database, you do not need to use the DBTableName property. However, note that Arcos converts its table names to lower case when it access the table. Therefore, if the table name contains any uppercase characters, you would need to specify both the DBTableName and the IntTableName.
SourceFile
The path to the CSV file. Can be one of:
SYS_FileName
to look for arch/static/FileName.csv
LOCAL_FileName
to look for config/static/FileName.csv
BasedOnType
This takes the following value:
static
- Use the CSV table handler.To order the results, use the Name property with a value of OrderBy
. Place this directly inside a table definition. You can sort on more than one field. In this example, the primary is in ascending order on "ModelID" and within this, the records are sorted in descending order based on "CategoryID".
<Property Name="OrderBy"> <Property> <Properties FieldName="ModelID" Direction="asc"/> </Property> <Property> <Properties FieldName="CategoryID" Direction="desc"/> </Property> </Property>