IDatabase.java [src/m/utils] Revision: default  Date:
package m.utils;

import java.util.ArrayList;
import org.codehaus.jettison.json.JSONObject;

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 *
 * @author ktraff
 */
public interface IDatabase {
    
    public String getSessionID();
    
    public String getDefaultSchema();
    
    public Table where(Table tbl, String expression) throws csip.api.server.ServiceException;
    
    public abstract boolean exists(String schema, String tableName) throws csip.api.server.ServiceException;

    public abstract ArrayList<String> getColumns(String schema, String tableName) throws csip.api.server.ServiceException;
    
    public abstract void addColumn(String schema, String tableName, String columnName, Database.DataType type) throws csip.api.server.ServiceException;
    
    public abstract void createSchema(String schemaName) throws csip.api.server.ServiceException;
    
    public abstract Table createTable(String schemaName, String tableName) throws Exception;
    
    public abstract Table createTable(String schemaName, String tableName, ArrayList<String> columns) throws Exception;
    
    public abstract Table copyTable(Table tbl, String schemaName, String tableName) throws Exception;

    public abstract int deleteTable(String tableName) throws csip.api.server.ServiceException;

    public abstract JSONObject toJSON(Table tbl) throws csip.api.server.ServiceException;
    
}