public final class CsvDataContext extends QueryPostprocessDataContext implements UpdateableDataContext
INFORMATION_SCHEMA_NAME| Constructor and Description |
|---|
CsvDataContext(File file)
Constructs a CSV DataContext based on a file
|
CsvDataContext(File file,
CsvConfiguration configuration)
Constructs a CSV DataContext based on a file
The file provided can be either existing or non-existing.
|
CsvDataContext(InputStream inputStream,
CsvConfiguration configuration)
Constructs a CSV DataContext based on an
InputStream |
CsvDataContext(Resource resource,
CsvConfiguration configuration) |
CsvDataContext(URL url,
CsvConfiguration configuration)
Constructs a CSV DataContext based on a
URL |
| Modifier and Type | Method and Description |
|---|---|
protected com.opencsv.CSVReader |
createCsvReader(BufferedReader reader) |
protected com.opencsv.CSVReader |
createCsvReader(int skipLines) |
protected Number |
executeCountQuery(Table table,
List<FilterItem> whereItems,
boolean functionApproximationAllowed) |
UpdateSummary |
executeUpdate(UpdateScript update) |
CsvConfiguration |
getConfiguration()
Gets the CSV configuration used
|
protected org.apache.metamodel.csv.CsvSchema |
getMainSchema() |
protected String |
getMainSchemaName() |
Resource |
getResource()
Gets the resource that is being read from.
|
protected boolean |
isWritable() |
DataSet |
materializeMainSchemaTable(Table table,
Column[] columns,
int maxRows) |
addConverter, executePrimaryKeyLookupQuery, executeQuery, getDefaultSchemaName, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, isScalarFunctionMaterialized, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTable, materializeMainSchemaTable, materializeTablecompileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, onSchemaCacheRefreshed, parseQuery, query, refreshSchemasclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcompileQuery, executeQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, parseQuery, query, refreshSchemaspublic CsvDataContext(File file, CsvConfiguration configuration)
file - configuration - public CsvDataContext(Resource resource, CsvConfiguration configuration)
public CsvDataContext(URL url, CsvConfiguration configuration)
URLurl - configuration - public CsvDataContext(File file)
file - public CsvDataContext(InputStream inputStream, CsvConfiguration configuration)
InputStreaminputStream - configuration - public CsvConfiguration getConfiguration()
public Resource getResource()
protected Number executeCountQuery(Table table, List<FilterItem> whereItems, boolean functionApproximationAllowed)
executeCountQuery in class QueryPostprocessDataContextpublic DataSet materializeMainSchemaTable(Table table, Column[] columns, int maxRows)
materializeMainSchemaTable in class QueryPostprocessDataContextprotected com.opencsv.CSVReader createCsvReader(int skipLines)
protected com.opencsv.CSVReader createCsvReader(BufferedReader reader)
protected org.apache.metamodel.csv.CsvSchema getMainSchema() throws MetaModelException
getMainSchema in class QueryPostprocessDataContextMetaModelExceptionprotected String getMainSchemaName()
getMainSchemaName in class QueryPostprocessDataContextprotected boolean isWritable()
public UpdateSummary executeUpdate(UpdateScript update)
executeUpdate in interface UpdateableDataContextCopyright © 2007–2017 The Apache Software Foundation. All rights reserved.