public class Neo4jDataContext extends QueryPostprocessDataContext implements DataContext, DocumentSourceProvider
Modifier and Type | Field and Description |
---|---|
static int |
DEFAULT_PORT |
static String |
SCHEMA_NAME |
INFORMATION_SCHEMA_NAME, SYSTEM_PROPERTY_CREATE_DEFAULT_TABLE_ALIAS
Constructor and Description |
---|
Neo4jDataContext(String hostname,
int port,
org.apache.http.impl.client.CloseableHttpClient httpClient) |
Neo4jDataContext(String hostname,
int port,
org.apache.http.impl.client.CloseableHttpClient httpClient,
SimpleTableDef... tableDefs) |
Neo4jDataContext(String hostname,
int port,
org.apache.http.impl.client.CloseableHttpClient httpClient,
String serviceRoot) |
Neo4jDataContext(String hostname,
int port,
org.apache.http.impl.client.CloseableHttpClient httpClient,
String serviceRoot,
SimpleTableDef... tableDefs) |
Neo4jDataContext(String hostname,
int port,
String username,
String password) |
Neo4jDataContext(String hostname,
int port,
String username,
String password,
SimpleTableDef... tableDefs) |
Neo4jDataContext(String hostname,
int port,
String username,
String password,
String serviceRoot) |
Neo4jDataContext(String hostname,
int port,
String username,
String password,
String serviceRoot,
SimpleTableDef... tableDefs) |
Modifier and Type | Method and Description |
---|---|
SimpleTableDef[] |
detectTableDefs() |
protected Number |
executeCountQuery(Table table,
List<FilterItem> whereItems,
boolean functionApproximationAllowed)
Executes a simple count query, if possible.
|
protected String |
getDefaultSchemaName()
Gets the name of the default schema.
|
DocumentSource |
getDocumentSourceForTable(String sourceCollectionName)
Gets a
DocumentSource for a particular source collection. |
protected Schema |
getMainSchema() |
protected String |
getMainSchemaName() |
DocumentSource |
getMixedDocumentSourceForSampling()
Gets a
DocumentSource containing documents of mixed origin and
type. |
protected DataSet |
materializeMainSchemaTable(Table table,
List<Column> columns,
int maxRows)
Executes a simple one-table query against a table in the main schema of the subclasses of this class.
|
protected DataSet |
materializeMainSchemaTable(Table table,
List<Column> columns,
int firstRow,
int maxRows)
Executes a simple one-table query against a table in the main schema of the subclasses of this class.
|
addConverter, executePrimaryKeyLookupQuery, executeQuery, getSchemaByNameInternal, getSchemaNamesInternal, isMainSchemaTable, isScalarFunctionMaterialized, materializeFromItem, materializeMainSchemaTable, materializeMainSchemaTableSelect, materializeTable
compileQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, isQualifiedPathDelim, onSchemaCacheRefreshed, parseQuery, query, refreshSchemas
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
compileQuery, executeQuery, executeQuery, executeQuery, getColumnByQualifiedLabel, getDefaultSchema, getSchemaByName, getSchemaNames, getSchemas, getTableByQualifiedLabel, parseQuery, query, refreshSchemas
public static final String SCHEMA_NAME
public static final int DEFAULT_PORT
public Neo4jDataContext(String hostname, int port, String username, String password, SimpleTableDef... tableDefs)
public Neo4jDataContext(String hostname, int port, String username, String password, String serviceRoot, SimpleTableDef... tableDefs)
public Neo4jDataContext(String hostname, int port, String username, String password)
public Neo4jDataContext(String hostname, int port, String username, String password, String serviceRoot)
public Neo4jDataContext(String hostname, int port, org.apache.http.impl.client.CloseableHttpClient httpClient)
public Neo4jDataContext(String hostname, int port, org.apache.http.impl.client.CloseableHttpClient httpClient, String serviceRoot)
public Neo4jDataContext(String hostname, int port, org.apache.http.impl.client.CloseableHttpClient httpClient, SimpleTableDef... tableDefs)
public Neo4jDataContext(String hostname, int port, org.apache.http.impl.client.CloseableHttpClient httpClient, String serviceRoot, SimpleTableDef... tableDefs)
protected String getDefaultSchemaName() throws MetaModelException
AbstractDataContext
getDefaultSchemaName
in class QueryPostprocessDataContext
MetaModelException
protected Schema getMainSchema() throws MetaModelException
getMainSchema
in class QueryPostprocessDataContext
MetaModelException
protected String getMainSchemaName() throws MetaModelException
getMainSchemaName
in class QueryPostprocessDataContext
MetaModelException
public SimpleTableDef[] detectTableDefs()
protected DataSet materializeMainSchemaTable(Table table, List<Column> columns, int firstRow, int maxRows)
QueryPostprocessDataContext
QueryPostprocessDataContext.materializeMainSchemaTable(Table, List, int)
and apply a
FirstRowDataSet
if necessary.materializeMainSchemaTable
in class QueryPostprocessDataContext
protected DataSet materializeMainSchemaTable(Table table, List<Column> columns, int maxRows)
QueryPostprocessDataContext
materializeMainSchemaTable
in class QueryPostprocessDataContext
table
- the table to querycolumns
- the columns of the table to querymaxRows
- the maximum amount of rows needed or -1 if all rows are wanted.protected Number executeCountQuery(Table table, List<FilterItem> whereItems, boolean functionApproximationAllowed)
QueryPostprocessDataContext
executeCountQuery
in class QueryPostprocessDataContext
table
- the table on which the count is requested.whereItems
- a (sometimes empty) list of WHERE items.functionApproximationAllowed
- whether approximation is allowed or not.public DocumentSource getMixedDocumentSourceForSampling()
DocumentSourceProvider
DocumentSource
containing documents of mixed origin and
type.getMixedDocumentSourceForSampling
in interface DocumentSourceProvider
public DocumentSource getDocumentSourceForTable(String sourceCollectionName)
DocumentSourceProvider
DocumentSource
for a particular source collection. See
Document.getSourceCollectionName()
.getDocumentSourceForTable
in interface DocumentSourceProvider
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.