public class PredicateInfo extends Object
Modifier and Type | Field and Description |
---|---|
static String |
HASH_PREFIX |
static int |
MAX_TABLE_NAME_LENGTH |
static String |
PARTITION_COLUMN_NAME |
static String |
PREDICATE_TABLE_SUFFIX |
static String |
VALUE_COLUMN_NAME |
Constructor and Description |
---|
PredicateInfo(Predicate predicate) |
Modifier and Type | Method and Description |
---|---|
List<String> |
argumentColumns() |
PreparedStatement |
createCountAllStatement(Connection connection,
List<Integer> partitions)
Create a prepared statement to count all the ground atoms for this predicate (within the specified partitions).
|
PreparedStatement |
createDeleteStatement(Connection connection,
int writePartition)
Create a prepared statement that deletes ground atoms that match all the arguments.
|
PreparedStatement |
createPartitionMoveStatement(Connection connection,
int oldPartition,
int newPartition)
Create a prepared statement that changes moves atoms from one partition to another.
|
PreparedStatement |
createQueryAllStatement(Connection connection,
List<Integer> partitions)
Create a prepared statement to query all the atoms for this predicate (within the specified partitions).
|
PreparedStatement |
createQueryAllWriteStatement(Connection connection,
int writePartition)
Create a prepared statement that queries for all random variable atoms
(atoms in the write partition) of this predicate.
|
PreparedStatement |
createQueryStatement(Connection connection,
List<Integer> readPartitions)
Create a prepared statement that queries for one specific atom.
|
PreparedStatement |
createUpsertStatement(Connection connection,
DatabaseDriver dbDriver)
Create a prepared statement that upserts.
|
int |
getCount(Connection connection)
Get a count of all the rows in the table.
|
void |
index(Connection connection,
DatabaseDriver dbDriver) |
boolean |
indexed() |
Predicate |
predicate() |
void |
setupTable(Connection connection,
DatabaseDriver dbDriver) |
String |
tableName() |
public static final String PREDICATE_TABLE_SUFFIX
public static final String PARTITION_COLUMN_NAME
public static final String VALUE_COLUMN_NAME
public static final int MAX_TABLE_NAME_LENGTH
public static final String HASH_PREFIX
public PredicateInfo(Predicate predicate)
public String tableName()
public Predicate predicate()
public boolean indexed()
public void setupTable(Connection connection, DatabaseDriver dbDriver)
public PreparedStatement createCountAllStatement(Connection connection, List<Integer> partitions)
public PreparedStatement createQueryAllStatement(Connection connection, List<Integer> partitions)
public PreparedStatement createQueryAllWriteStatement(Connection connection, int writePartition)
public PreparedStatement createQueryStatement(Connection connection, List<Integer> readPartitions)
public PreparedStatement createUpsertStatement(Connection connection, DatabaseDriver dbDriver)
public PreparedStatement createDeleteStatement(Connection connection, int writePartition)
public PreparedStatement createPartitionMoveStatement(Connection connection, int oldPartition, int newPartition)
public int getCount(Connection connection)
public void index(Connection connection, DatabaseDriver dbDriver)
Copyright © 2018 University of California, Santa Cruz. All rights reserved.