com.google.visualization.datasource.util
Class SqlDataSourceHelper
java.lang.Object
com.google.visualization.datasource.util.SqlDataSourceHelper
public class SqlDataSourceHelper
- extends 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.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
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 © 2012 Google. All Rights Reserved.