Developer Question: Multiple Data Sources

LabKey Support Forum (Inactive)
Developer Question: Multiple Data Sources rthomas  2006-03-01 17:18
Status: Closed
 
Hi all,

I created a second DataSource in the cpas.xml file. From the log files, I can see that upon cpas initialization, the database is successfully opened.

Is it possible to use the data base classes in org.fhcrc.cpas.data.* to access the data in the new DataSource? If not, could you give me pointers on what classes will I have to either implement or write from scratch to be able to do this from within the module?

Is there any documentation on using your API?

Thanks Bob

 
 
arauch responded:  2006-03-01 19:19
Yes, you should be able to use all the CPAS apis with your new database. But no, we don't have a lot of developer documentation at this point, other than the overview slides I posted earlier. The key files to look at include:
  • Table.java: a simple, low level data access layer with methods like insert, delete, update, executeQuery, select, etc.
  • DbSchema.java, TableInfo.java, ColumnInfo.java: use to access metadata for your tables and columns. These get passed to Table, DataRegion, and other data classes.
  • /cpasProperties/xxx.xml (e.g., ms2.xml, core.xml): how we specify additional meta data associated with columns and tables (e.g., captions, format strings, display widths)
  • SqlDialects: used to retrieve database-specific syntax and constructs.
  • DataRegion/GridView: our data grid… provides UI for displaying, filtering, and sorting tables/views/resultsets.
Adam
 
adam responded:  2007-01-03 13:39