dynamobi/adminws — Issue #26: [DWS-6] POST Table web serivce
Author: dynamobi-build
Created: 2011-12-30 01:07:18+00:00
State: open

[reporter="ngoodman", created="Wed, 3 Mar 2010 21:44:16 -0800", resolved="Thu, 24 Jun 2010 12:04:36 -0700"]

Implement a POST web service that will receive a Table object.

@Path("/{catalog}/{schema}/{table}")

@POST

public TableDetails postTableDetails(@PathParam("catalog") String catalogName, @PathParam("schema")String schema,

@PathParam("table") String table) throws AppException;

The TableDetails object will contain information about the columns etc. Here is an example of a TableDetails:

−

The logic for the webservice is:

If the table does not exist, create the table (LOCALDB/TESTING/T1) with all the columns.

If the table already exists, compare the columns with the columns in the database. ADD any columns that are in the TableDetails that are NOT in the database given the datatypes/etc. If there are any columns that aren't in TableDetails that are in the database, throw an AppException (cannot remove columns).