com.google.visualization.datasource.util
Class SqlDataSourceHelper

java.lang.Object
  extended by com.google.visualization.datasource.util.SqlDataSourceHelper

public class SqlDataSourceHelper
extends java.lang.Object

A utility class, with static methods that are specific for creating a data source based on a SQL database table. For now, it can be based on mysql database only.

Author:
Liron L.

Method Summary
static DataTable executeQuery(Query query, SqlDatabaseDescription databaseDescription)
          Executes the given query on the given SQL database table, and returns the result as a DataTable.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

executeQuery

public static DataTable executeQuery(Query query,
                                     SqlDatabaseDescription databaseDescription)
                              throws DataSourceException
Executes the given query on the given SQL database table, and returns the result as a DataTable.

Parameters:
query - The query.
databaseDescription - The information needed to connect to the SQL database and table.
Returns:
DataTable A data table with the data from the specified sql table, after applying the specified query on it.
Throws:
DataSourceException - Thrown when the data source fails to perform the action.


Copyright © 2009 Google. All Rights Reserved.