repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 | partition stringclasses 1
value |
|---|---|---|---|---|---|---|---|---|---|---|---|
VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.shutdown | protected void shutdown() throws InterruptedException {
if (m_deadConnectionFuture != null) {
m_deadConnectionFuture.cancel(false);
try {m_deadConnectionFuture.get();} catch (Throwable t) {}
}
if (m_topologyCheckFuture != null) {
m_topologyCheckFuture.cancel(f... | java | protected void shutdown() throws InterruptedException {
if (m_deadConnectionFuture != null) {
m_deadConnectionFuture.cancel(false);
try {m_deadConnectionFuture.get();} catch (Throwable t) {}
}
if (m_topologyCheckFuture != null) {
m_topologyCheckFuture.cancel(f... | [
"protected",
"void",
"shutdown",
"(",
")",
"throws",
"InterruptedException",
"{",
"if",
"(",
"m_deadConnectionFuture",
"!=",
"null",
")",
"{",
"m_deadConnectionFuture",
".",
"cancel",
"(",
"false",
")",
";",
"try",
"{",
"m_deadConnectionFuture",
".",
"get",
"(",... | all your read buffers" events .. or something .. | [
"all",
"your",
"read",
"buffers",
"events",
"..",
"or",
"something",
".."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L1717-L1744 | train |
VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.sendEOLMessage | public void sendEOLMessage(int partitionId) {
final long initiatorHSId = m_cartographer.getHSIdForMaster(partitionId);
Iv2EndOfLogMessage message = new Iv2EndOfLogMessage(partitionId);
m_mailbox.send(initiatorHSId, message);
} | java | public void sendEOLMessage(int partitionId) {
final long initiatorHSId = m_cartographer.getHSIdForMaster(partitionId);
Iv2EndOfLogMessage message = new Iv2EndOfLogMessage(partitionId);
m_mailbox.send(initiatorHSId, message);
} | [
"public",
"void",
"sendEOLMessage",
"(",
"int",
"partitionId",
")",
"{",
"final",
"long",
"initiatorHSId",
"=",
"m_cartographer",
".",
"getHSIdForMaster",
"(",
"partitionId",
")",
";",
"Iv2EndOfLogMessage",
"message",
"=",
"new",
"Iv2EndOfLogMessage",
"(",
"partitio... | Sends an end of log message to the master of that partition. This should
only be called at the end of replay.
@param partitionId | [
"Sends",
"an",
"end",
"of",
"log",
"message",
"to",
"the",
"master",
"of",
"that",
"partition",
".",
"This",
"should",
"only",
"be",
"called",
"at",
"the",
"end",
"of",
"replay",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L2020-L2024 | train |
VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.getMispartitionedErrorResponse | private ClientResponseImpl getMispartitionedErrorResponse(StoredProcedureInvocation task,
Procedure catProc, Exception ex) {
Object invocationParameter = null;
try {
invocationParameter = task.getParameterAtIndex(catProc.getPartitionparameter());
} catch (Exception ex2) {... | java | private ClientResponseImpl getMispartitionedErrorResponse(StoredProcedureInvocation task,
Procedure catProc, Exception ex) {
Object invocationParameter = null;
try {
invocationParameter = task.getParameterAtIndex(catProc.getPartitionparameter());
} catch (Exception ex2) {... | [
"private",
"ClientResponseImpl",
"getMispartitionedErrorResponse",
"(",
"StoredProcedureInvocation",
"task",
",",
"Procedure",
"catProc",
",",
"Exception",
"ex",
")",
"{",
"Object",
"invocationParameter",
"=",
"null",
";",
"try",
"{",
"invocationParameter",
"=",
"task",... | Generate a mispartitioned response also log the message. | [
"Generate",
"a",
"mispartitioned",
"response",
"also",
"log",
"the",
"message",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L2044-L2065 | train |
VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.ceaseAllPublicFacingTrafficImmediately | public boolean ceaseAllPublicFacingTrafficImmediately() {
try {
if (m_acceptor != null) {
// This call seems to block until the shutdown is done
// which is good becasue we assume there will be no new
// connections afterward
m_acceptor... | java | public boolean ceaseAllPublicFacingTrafficImmediately() {
try {
if (m_acceptor != null) {
// This call seems to block until the shutdown is done
// which is good becasue we assume there will be no new
// connections afterward
m_acceptor... | [
"public",
"boolean",
"ceaseAllPublicFacingTrafficImmediately",
"(",
")",
"{",
"try",
"{",
"if",
"(",
"m_acceptor",
"!=",
"null",
")",
"{",
"// This call seems to block until the shutdown is done",
"// which is good becasue we assume there will be no new",
"// connections afterward"... | This is not designed to be a safe shutdown.
This is designed to stop sending messages to clients as fast as possible.
It is currently called from VoltDB.crash...
Note: this really needs to work. We CAN'T respond back to the client anything
after we've decided to crash or it might break some of our contracts.
@return ... | [
"This",
"is",
"not",
"designed",
"to",
"be",
"a",
"safe",
"shutdown",
".",
"This",
"is",
"designed",
"to",
"stop",
"sending",
"messages",
"to",
"clients",
"as",
"fast",
"as",
"possible",
".",
"It",
"is",
"currently",
"called",
"from",
"VoltDB",
".",
"cra... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L2120-L2149 | train |
VoltDB/voltdb | src/frontend/org/voltdb/ClientInterface.java | ClientInterface.processMigratePartitionLeaderTask | void processMigratePartitionLeaderTask(MigratePartitionLeaderMessage message) {
synchronized(m_lock) {
//start MigratePartitionLeader service
if (message.startMigratingPartitionLeaders()) {
if (m_migratePartitionLeaderExecutor == null) {
m_migrateParti... | java | void processMigratePartitionLeaderTask(MigratePartitionLeaderMessage message) {
synchronized(m_lock) {
//start MigratePartitionLeader service
if (message.startMigratingPartitionLeaders()) {
if (m_migratePartitionLeaderExecutor == null) {
m_migrateParti... | [
"void",
"processMigratePartitionLeaderTask",
"(",
"MigratePartitionLeaderMessage",
"message",
")",
"{",
"synchronized",
"(",
"m_lock",
")",
"{",
"//start MigratePartitionLeader service",
"if",
"(",
"message",
".",
"startMigratingPartitionLeaders",
"(",
")",
")",
"{",
"if"... | start or stop MigratePartitionLeader task | [
"start",
"or",
"stop",
"MigratePartitionLeader",
"task"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientInterface.java#L2160-L2183 | train |
VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/Resume.java | Resume.run | public VoltTable[] run(SystemProcedureExecutionContext ctx) {
// Choose the lowest site ID on this host to actually flip the bit
VoltDBInterface voltdb = VoltDB.instance();
OperationMode opMode = voltdb.getMode();
if (ctx.isLowestSiteId()) {
ZooKeeper zk = voltdb.getHostMess... | java | public VoltTable[] run(SystemProcedureExecutionContext ctx) {
// Choose the lowest site ID on this host to actually flip the bit
VoltDBInterface voltdb = VoltDB.instance();
OperationMode opMode = voltdb.getMode();
if (ctx.isLowestSiteId()) {
ZooKeeper zk = voltdb.getHostMess... | [
"public",
"VoltTable",
"[",
"]",
"run",
"(",
"SystemProcedureExecutionContext",
"ctx",
")",
"{",
"// Choose the lowest site ID on this host to actually flip the bit",
"VoltDBInterface",
"voltdb",
"=",
"VoltDB",
".",
"instance",
"(",
")",
";",
"OperationMode",
"opMode",
"=... | Exit admin mode
@param ctx Internal parameter. Not user-accessible.
@return Standard STATUS table. | [
"Exit",
"admin",
"mode"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/Resume.java#L61-L106 | train |
VoltDB/voltdb | src/frontend/org/voltdb/NativeLibraryLoader.java | NativeLibraryLoader.getNativeLibraryFile | private static File getNativeLibraryFile(String libname) {
// for now, arch is always x86_64
String pathFormat = "/org/voltdb/native/%s/x86_64";
String libPath = null;
String osName = System.getProperty("os.name").toLowerCase();
if (osName.contains("mac")) {
libPath ... | java | private static File getNativeLibraryFile(String libname) {
// for now, arch is always x86_64
String pathFormat = "/org/voltdb/native/%s/x86_64";
String libPath = null;
String osName = System.getProperty("os.name").toLowerCase();
if (osName.contains("mac")) {
libPath ... | [
"private",
"static",
"File",
"getNativeLibraryFile",
"(",
"String",
"libname",
")",
"{",
"// for now, arch is always x86_64",
"String",
"pathFormat",
"=",
"\"/org/voltdb/native/%s/x86_64\"",
";",
"String",
"libPath",
"=",
"null",
";",
"String",
"osName",
"=",
"System",
... | Returns the native library file copied into a readable location.
@param libname the library name.
@return the native library file copied into a readable location. | [
"Returns",
"the",
"native",
"library",
"file",
"copied",
"into",
"a",
"readable",
"location",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/NativeLibraryLoader.java#L144-L181 | train |
VoltDB/voltdb | src/frontend/org/voltdb/utils/SerializationHelper.java | SerializationHelper.writeString | public static void writeString(String value, ByteBuffer buf) {
if (value == null) {
buf.putInt(VoltType.NULL_STRING_LENGTH);
return;
}
byte[] strbytes = value.getBytes(Constants.UTF8ENCODING);
int len = strbytes.length;
buf.putInt(len);
buf.put(s... | java | public static void writeString(String value, ByteBuffer buf) {
if (value == null) {
buf.putInt(VoltType.NULL_STRING_LENGTH);
return;
}
byte[] strbytes = value.getBytes(Constants.UTF8ENCODING);
int len = strbytes.length;
buf.putInt(len);
buf.put(s... | [
"public",
"static",
"void",
"writeString",
"(",
"String",
"value",
",",
"ByteBuffer",
"buf",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"buf",
".",
"putInt",
"(",
"VoltType",
".",
"NULL_STRING_LENGTH",
")",
";",
"return",
";",
"}",
"byte",
"... | Write a string in the standard VoltDB way | [
"Write",
"a",
"string",
"in",
"the",
"standard",
"VoltDB",
"way"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/SerializationHelper.java#L235-L246 | train |
VoltDB/voltdb | src/frontend/org/voltdb/utils/SerializationHelper.java | SerializationHelper.writeVarbinary | public static void writeVarbinary(byte[] bytes, ByteBuffer buf) throws IOException {
if (bytes == null) {
buf.putInt(VoltType.NULL_STRING_LENGTH);
return;
}
buf.putInt(bytes.length);
buf.put(bytes);
} | java | public static void writeVarbinary(byte[] bytes, ByteBuffer buf) throws IOException {
if (bytes == null) {
buf.putInt(VoltType.NULL_STRING_LENGTH);
return;
}
buf.putInt(bytes.length);
buf.put(bytes);
} | [
"public",
"static",
"void",
"writeVarbinary",
"(",
"byte",
"[",
"]",
"bytes",
",",
"ByteBuffer",
"buf",
")",
"throws",
"IOException",
"{",
"if",
"(",
"bytes",
"==",
"null",
")",
"{",
"buf",
".",
"putInt",
"(",
"VoltType",
".",
"NULL_STRING_LENGTH",
")",
... | Write a set of bytes in the standard VoltDB way | [
"Write",
"a",
"set",
"of",
"bytes",
"in",
"the",
"standard",
"VoltDB",
"way"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/utils/SerializationHelper.java#L251-L259 | train |
VoltDB/voltdb | examples/geospatial/client/geospatial/BidGenerator.java | BidGenerator.getMaxBidId | private static long getMaxBidId(Client client) {
long currentMaxBidId = 0;
try {
VoltTable vt = client.callProcedure("@AdHoc", "select max(id) from bids").getResults()[0];
vt.advanceRow();
currentMaxBidId = vt.getLong(0);
if (vt.wasNull()) {
... | java | private static long getMaxBidId(Client client) {
long currentMaxBidId = 0;
try {
VoltTable vt = client.callProcedure("@AdHoc", "select max(id) from bids").getResults()[0];
vt.advanceRow();
currentMaxBidId = vt.getLong(0);
if (vt.wasNull()) {
... | [
"private",
"static",
"long",
"getMaxBidId",
"(",
"Client",
"client",
")",
"{",
"long",
"currentMaxBidId",
"=",
"0",
";",
"try",
"{",
"VoltTable",
"vt",
"=",
"client",
".",
"callProcedure",
"(",
"\"@AdHoc\"",
",",
"\"select max(id) from bids\"",
")",
".",
"getR... | Find the current highest bid id in the bids table. We'll start generating
new bids at this number plus one.
@param client A connection to the database
@return current highest bid id | [
"Find",
"the",
"current",
"highest",
"bid",
"id",
"in",
"the",
"bids",
"table",
".",
"We",
"ll",
"start",
"generating",
"new",
"bids",
"at",
"this",
"number",
"plus",
"one",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/geospatial/client/geospatial/BidGenerator.java#L80-L94 | train |
VoltDB/voltdb | examples/geospatial/client/geospatial/BidGenerator.java | BidGenerator.run | @Override
public void run() {
long bidId = m_bidId++;
long advertiserId = Math.abs(m_rand.nextLong()) % NUM_ADVERTISERS;
GeographyValue bidRegion = Regions.pickRandomRegion();
TimestampType bidStartTime = new TimestampType();
TimestampType bidEndTime = new TimestampType(
... | java | @Override
public void run() {
long bidId = m_bidId++;
long advertiserId = Math.abs(m_rand.nextLong()) % NUM_ADVERTISERS;
GeographyValue bidRegion = Regions.pickRandomRegion();
TimestampType bidStartTime = new TimestampType();
TimestampType bidEndTime = new TimestampType(
... | [
"@",
"Override",
"public",
"void",
"run",
"(",
")",
"{",
"long",
"bidId",
"=",
"m_bidId",
"++",
";",
"long",
"advertiserId",
"=",
"Math",
".",
"abs",
"(",
"m_rand",
".",
"nextLong",
"(",
")",
")",
"%",
"NUM_ADVERTISERS",
";",
"GeographyValue",
"bidRegion... | This is the "run" method for this Runnable subclass.
Generate one new row for the bids table, and insert it. | [
"This",
"is",
"the",
"run",
"method",
"for",
"this",
"Runnable",
"subclass",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/geospatial/client/geospatial/BidGenerator.java#L101-L126 | train |
VoltDB/voltdb | third_party/java/src/org/apache/jute_voltpatches/compiler/JFile.java | JFile.getName | String getName() {
int idx = mName.lastIndexOf('/');
return (idx > 0) ? mName.substring(idx) : mName;
} | java | String getName() {
int idx = mName.lastIndexOf('/');
return (idx > 0) ? mName.substring(idx) : mName;
} | [
"String",
"getName",
"(",
")",
"{",
"int",
"idx",
"=",
"mName",
".",
"lastIndexOf",
"(",
"'",
"'",
")",
";",
"return",
"(",
"idx",
">",
"0",
")",
"?",
"mName",
".",
"substring",
"(",
"idx",
")",
":",
"mName",
";",
"}"
] | Strip the other pathname components and return the basename | [
"Strip",
"the",
"other",
"pathname",
"components",
"and",
"return",
"the",
"basename"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/apache/jute_voltpatches/compiler/JFile.java#L54-L57 | train |
VoltDB/voltdb | src/frontend/org/voltdb/planner/StatementPartitioning.java | StatementPartitioning.singlePartitioningExpression | public AbstractExpression singlePartitioningExpression() {
AbstractExpression e = singlePartitioningExpressionForReport();
if (e != null && isUsefulPartitioningExpression(e)) {
return e;
}
return null;
} | java | public AbstractExpression singlePartitioningExpression() {
AbstractExpression e = singlePartitioningExpressionForReport();
if (e != null && isUsefulPartitioningExpression(e)) {
return e;
}
return null;
} | [
"public",
"AbstractExpression",
"singlePartitioningExpression",
"(",
")",
"{",
"AbstractExpression",
"e",
"=",
"singlePartitioningExpressionForReport",
"(",
")",
";",
"if",
"(",
"e",
"!=",
"null",
"&&",
"isUsefulPartitioningExpression",
"(",
"e",
")",
")",
"{",
"ret... | smart accessor - only returns a value if it was unique and is useful
@return | [
"smart",
"accessor",
"-",
"only",
"returns",
"a",
"value",
"if",
"it",
"was",
"unique",
"and",
"is",
"useful"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/StatementPartitioning.java#L310-L316 | train |
VoltDB/voltdb | src/frontend/org/voltdb/planner/StatementPartitioning.java | StatementPartitioning.analyzeTablePartitioning | void analyzeTablePartitioning(Collection<StmtTableScan> collection)
throws PlanningErrorException
{
m_countOfPartitionedTables = 0;
// Do we have a need for a distributed scan at all?
// Iterate over the tables to collect partition columns.
for (StmtTableScan tableScan : ... | java | void analyzeTablePartitioning(Collection<StmtTableScan> collection)
throws PlanningErrorException
{
m_countOfPartitionedTables = 0;
// Do we have a need for a distributed scan at all?
// Iterate over the tables to collect partition columns.
for (StmtTableScan tableScan : ... | [
"void",
"analyzeTablePartitioning",
"(",
"Collection",
"<",
"StmtTableScan",
">",
"collection",
")",
"throws",
"PlanningErrorException",
"{",
"m_countOfPartitionedTables",
"=",
"0",
";",
"// Do we have a need for a distributed scan at all?",
"// Iterate over the tables to collect p... | This simple analysis counts the number of partitioned tables in the join tree
of a query, and initializes a guess for the count of independently partitioned tables.
@param tableCacheList
@throws PlanningErrorException | [
"This",
"simple",
"analysis",
"counts",
"the",
"number",
"of",
"partitioned",
"tables",
"in",
"the",
"join",
"tree",
"of",
"a",
"query",
"and",
"initializes",
"a",
"guess",
"for",
"the",
"count",
"of",
"independently",
"partitioned",
"tables",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/StatementPartitioning.java#L563-L576 | train |
VoltDB/voltdb | src/frontend/org/voltdb/planner/StatementPartitioning.java | StatementPartitioning.resetAnalysisState | public void resetAnalysisState() {
m_countOfIndependentlyPartitionedTables = -1;
m_countOfPartitionedTables = -1;
m_fullColumnName = null;
m_inferredExpression.clear();
m_inferredParameterIndex = -1;
m_inferredValue = null;
m_isDML = false;
setJoinValid(tr... | java | public void resetAnalysisState() {
m_countOfIndependentlyPartitionedTables = -1;
m_countOfPartitionedTables = -1;
m_fullColumnName = null;
m_inferredExpression.clear();
m_inferredParameterIndex = -1;
m_inferredValue = null;
m_isDML = false;
setJoinValid(tr... | [
"public",
"void",
"resetAnalysisState",
"(",
")",
"{",
"m_countOfIndependentlyPartitionedTables",
"=",
"-",
"1",
";",
"m_countOfPartitionedTables",
"=",
"-",
"1",
";",
"m_fullColumnName",
"=",
"null",
";",
"m_inferredExpression",
".",
"clear",
"(",
")",
";",
"m_in... | Sometimes when we fail to plan a statement, we try again with different inputs
using the same StatementPartitioning object. In this case, it's incumbent on
callers to reset the cached analysis state set by calling this method.
TODO: one could imagine separating this class into two classes:
- One for partitioning cont... | [
"Sometimes",
"when",
"we",
"fail",
"to",
"plan",
"a",
"statement",
"we",
"try",
"again",
"with",
"different",
"inputs",
"using",
"the",
"same",
"StatementPartitioning",
"object",
".",
"In",
"this",
"case",
"it",
"s",
"incumbent",
"on",
"callers",
"to",
"rese... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/planner/StatementPartitioning.java#L590-L601 | train |
VoltDB/voltdb | src/frontend/org/voltdb/importer/AbstractImporter.java | AbstractImporter.callProcedure | public boolean callProcedure(Invocation invocation, ProcedureCallback callback)
{
try {
boolean result = m_importServerAdapter.callProcedure(this,
m_backPressurePredicate,
... | java | public boolean callProcedure(Invocation invocation, ProcedureCallback callback)
{
try {
boolean result = m_importServerAdapter.callProcedure(this,
m_backPressurePredicate,
... | [
"public",
"boolean",
"callProcedure",
"(",
"Invocation",
"invocation",
",",
"ProcedureCallback",
"callback",
")",
"{",
"try",
"{",
"boolean",
"result",
"=",
"m_importServerAdapter",
".",
"callProcedure",
"(",
"this",
",",
"m_backPressurePredicate",
",",
"callback",
... | This should be used importer implementations to execute a stored procedure.
@param invocation Invocation object with procedure name and parameter information
@param callback the callback that will receive procedure invocation status
@return returns true if the procedure execution went through successfully; false other... | [
"This",
"should",
"be",
"used",
"importer",
"implementations",
"to",
"execute",
"a",
"stored",
"procedure",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporter.java#L108-L121 | train |
VoltDB/voltdb | src/frontend/org/voltdb/importer/AbstractImporter.java | AbstractImporter.rateLimitedLog | @Override
public void rateLimitedLog(Level level, Throwable cause, String format, Object... args)
{
m_logger.rateLimitedLog(LOG_SUPPRESSION_INTERVAL_SECONDS, level, cause, format, args);
} | java | @Override
public void rateLimitedLog(Level level, Throwable cause, String format, Object... args)
{
m_logger.rateLimitedLog(LOG_SUPPRESSION_INTERVAL_SECONDS, level, cause, format, args);
} | [
"@",
"Override",
"public",
"void",
"rateLimitedLog",
"(",
"Level",
"level",
",",
"Throwable",
"cause",
",",
"String",
"format",
",",
"Object",
"...",
"args",
")",
"{",
"m_logger",
".",
"rateLimitedLog",
"(",
"LOG_SUPPRESSION_INTERVAL_SECONDS",
",",
"level",
",",... | This rate limited log must be used by the importers to log messages that may
happen frequently and must be rate limited.
@param level the log level
@param cause cause exception, if there is one
@param format error message format
@param args arguments to format the error message | [
"This",
"rate",
"limited",
"log",
"must",
"be",
"used",
"by",
"the",
"importers",
"to",
"log",
"messages",
"that",
"may",
"happen",
"frequently",
"and",
"must",
"be",
"rate",
"limited",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporter.java#L157-L161 | train |
VoltDB/voltdb | src/frontend/org/voltdb/importer/AbstractImporter.java | AbstractImporter.trace | protected void trace(Throwable t, String msgFormat, Object... args)
{
m_logger.trace(String.format(msgFormat, args), t);
} | java | protected void trace(Throwable t, String msgFormat, Object... args)
{
m_logger.trace(String.format(msgFormat, args), t);
} | [
"protected",
"void",
"trace",
"(",
"Throwable",
"t",
",",
"String",
"msgFormat",
",",
"Object",
"...",
"args",
")",
"{",
"m_logger",
".",
"trace",
"(",
"String",
".",
"format",
"(",
"msgFormat",
",",
"args",
")",
",",
"t",
")",
";",
"}"
] | Log a TRACE level log message.
@param msgFormat Format
@param t Throwable to log | [
"Log",
"a",
"TRACE",
"level",
"log",
"message",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporter.java#L221-L224 | train |
VoltDB/voltdb | src/frontend/org/voltdb/importer/AbstractImporter.java | AbstractImporter.warn | @Override
public void warn(Throwable t, String msgFormat, Object... args)
{
m_logger.warn(String.format(msgFormat, args), t);
} | java | @Override
public void warn(Throwable t, String msgFormat, Object... args)
{
m_logger.warn(String.format(msgFormat, args), t);
} | [
"@",
"Override",
"public",
"void",
"warn",
"(",
"Throwable",
"t",
",",
"String",
"msgFormat",
",",
"Object",
"...",
"args",
")",
"{",
"m_logger",
".",
"warn",
"(",
"String",
".",
"format",
"(",
"msgFormat",
",",
"args",
")",
",",
"t",
")",
";",
"}"
] | Log a WARN level log message.
@param msgFormat Format
@param t Throwable to log | [
"Log",
"a",
"WARN",
"level",
"log",
"message",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/importer/AbstractImporter.java#L232-L236 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java | Right.add | public void add(Right right) {
if (isFull) {
return;
}
if (right.isFull) {
clear();
isFull = true;
return;
}
isFullSelect |= right.isFullSelect;
isFullInsert |= right.isFullInsert;
isFullUpdate |= ri... | java | public void add(Right right) {
if (isFull) {
return;
}
if (right.isFull) {
clear();
isFull = true;
return;
}
isFullSelect |= right.isFullSelect;
isFullInsert |= right.isFullInsert;
isFullUpdate |= ri... | [
"public",
"void",
"add",
"(",
"Right",
"right",
")",
"{",
"if",
"(",
"isFull",
")",
"{",
"return",
";",
"}",
"if",
"(",
"right",
".",
"isFull",
")",
"{",
"clear",
"(",
")",
";",
"isFull",
"=",
"true",
";",
"return",
";",
"}",
"isFullSelect",
"|="... | Supports column level GRANT | [
"Supports",
"column",
"level",
"GRANT"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java#L138-L207 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java | Right.remove | public void remove(SchemaObject object, Right right) {
if (right.isFull) {
clear();
return;
}
if (isFull) {
isFull = false;
isFullSelect = isFullInsert = isFullUpdate = isFullReferences =
isFullDelete = true;
}
i... | java | public void remove(SchemaObject object, Right right) {
if (right.isFull) {
clear();
return;
}
if (isFull) {
isFull = false;
isFullSelect = isFullInsert = isFullUpdate = isFullReferences =
isFullDelete = true;
}
i... | [
"public",
"void",
"remove",
"(",
"SchemaObject",
"object",
",",
"Right",
"right",
")",
"{",
"if",
"(",
"right",
".",
"isFull",
")",
"{",
"clear",
"(",
")",
";",
"return",
";",
"}",
"if",
"(",
"isFull",
")",
"{",
"isFull",
"=",
"false",
";",
"isFull... | supports column level REVOKE | [
"supports",
"column",
"level",
"REVOKE"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java#L212-L314 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java | Right.containsAllColumns | static boolean containsAllColumns(OrderedHashSet columnSet, Table table,
boolean[] columnCheckList) {
for (int i = 0; i < columnCheckList.length; i++) {
if (columnCheckList[i]) {
if (columnSet == null) {
return false;
... | java | static boolean containsAllColumns(OrderedHashSet columnSet, Table table,
boolean[] columnCheckList) {
for (int i = 0; i < columnCheckList.length; i++) {
if (columnCheckList[i]) {
if (columnSet == null) {
return false;
... | [
"static",
"boolean",
"containsAllColumns",
"(",
"OrderedHashSet",
"columnSet",
",",
"Table",
"table",
",",
"boolean",
"[",
"]",
"columnCheckList",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"columnCheckList",
".",
"length",
";",
"i",
"++",
... | Supports column level checks | [
"Supports",
"column",
"level",
"checks"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java#L486-L504 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java | Right.getTableRightsSQL | String getTableRightsSQL(Table table) {
StringBuffer sb = new StringBuffer();
if (isFull) {
return Tokens.T_ALL;
}
if (isFullSelect) {
sb.append(Tokens.T_SELECT);
sb.append(',');
} else if (selectColumnSet != null) {
sb.append(To... | java | String getTableRightsSQL(Table table) {
StringBuffer sb = new StringBuffer();
if (isFull) {
return Tokens.T_ALL;
}
if (isFullSelect) {
sb.append(Tokens.T_SELECT);
sb.append(',');
} else if (selectColumnSet != null) {
sb.append(To... | [
"String",
"getTableRightsSQL",
"(",
"Table",
"table",
")",
"{",
"StringBuffer",
"sb",
"=",
"new",
"StringBuffer",
"(",
")",
";",
"if",
"(",
"isFull",
")",
"{",
"return",
"Tokens",
".",
"T_ALL",
";",
"}",
"if",
"(",
"isFullSelect",
")",
"{",
"sb",
".",
... | supports column level GRANT | [
"supports",
"column",
"level",
"GRANT"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/rights/Right.java#L680-L737 | train |
VoltDB/voltdb | src/frontend/org/voltcore/utils/PortGenerator.java | PortGenerator.next | public synchronized int next() {
while(nextPort <= MAX_STATIC_PORT) {
int port = nextPort++;
if (MiscUtils.isBindable(port)) {
return port;
}
}
throw new RuntimeException("Exhausted all possible ports");
} | java | public synchronized int next() {
while(nextPort <= MAX_STATIC_PORT) {
int port = nextPort++;
if (MiscUtils.isBindable(port)) {
return port;
}
}
throw new RuntimeException("Exhausted all possible ports");
} | [
"public",
"synchronized",
"int",
"next",
"(",
")",
"{",
"while",
"(",
"nextPort",
"<=",
"MAX_STATIC_PORT",
")",
"{",
"int",
"port",
"=",
"nextPort",
"++",
";",
"if",
"(",
"MiscUtils",
".",
"isBindable",
"(",
"port",
")",
")",
"{",
"return",
"port",
";"... | Return the next bindable port | [
"Return",
"the",
"next",
"bindable",
"port"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltcore/utils/PortGenerator.java#L37-L45 | train |
VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.range | static Range<Long> range(long start, long end) {
return Range.closed(start, end).canonical(DiscreteDomain.longs());
} | java | static Range<Long> range(long start, long end) {
return Range.closed(start, end).canonical(DiscreteDomain.longs());
} | [
"static",
"Range",
"<",
"Long",
">",
"range",
"(",
"long",
"start",
",",
"long",
"end",
")",
"{",
"return",
"Range",
".",
"closed",
"(",
"start",
",",
"end",
")",
".",
"canonical",
"(",
"DiscreteDomain",
".",
"longs",
"(",
")",
")",
";",
"}"
] | Returns a canonical range that can be added to the internal range
set. Only ranges returned by this method can be added to the range set,
otherwise range operations like contains may yield unexpected
results. Consult the Guava doc on Range for details.
@param start Start of the range
@param end End of the rang... | [
"Returns",
"a",
"canonical",
"range",
"that",
"can",
"be",
"added",
"to",
"the",
"internal",
"range",
"set",
".",
"Only",
"ranges",
"returned",
"by",
"this",
"method",
"can",
"be",
"added",
"to",
"the",
"range",
"set",
"otherwise",
"range",
"operations",
"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L45-L47 | train |
VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.start | private static long start(Range<Long> range) {
if (range.lowerBoundType() == BoundType.OPEN) {
return DiscreteDomain.longs().next(range.lowerEndpoint());
} else {
return range.lowerEndpoint();
}
} | java | private static long start(Range<Long> range) {
if (range.lowerBoundType() == BoundType.OPEN) {
return DiscreteDomain.longs().next(range.lowerEndpoint());
} else {
return range.lowerEndpoint();
}
} | [
"private",
"static",
"long",
"start",
"(",
"Range",
"<",
"Long",
">",
"range",
")",
"{",
"if",
"(",
"range",
".",
"lowerBoundType",
"(",
")",
"==",
"BoundType",
".",
"OPEN",
")",
"{",
"return",
"DiscreteDomain",
".",
"longs",
"(",
")",
".",
"next",
"... | Get the start of the range. Always use this method to get the start of a
range because it respects the bound type.
@param range
@return Start of the range | [
"Get",
"the",
"start",
"of",
"the",
"range",
".",
"Always",
"use",
"this",
"method",
"to",
"get",
"the",
"start",
"of",
"a",
"range",
"because",
"it",
"respects",
"the",
"bound",
"type",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L55-L61 | train |
VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.end | private static long end(Range<Long> range) {
if (range.upperBoundType() == BoundType.OPEN) {
return DiscreteDomain.longs().previous(range.upperEndpoint());
} else {
return range.upperEndpoint();
}
} | java | private static long end(Range<Long> range) {
if (range.upperBoundType() == BoundType.OPEN) {
return DiscreteDomain.longs().previous(range.upperEndpoint());
} else {
return range.upperEndpoint();
}
} | [
"private",
"static",
"long",
"end",
"(",
"Range",
"<",
"Long",
">",
"range",
")",
"{",
"if",
"(",
"range",
".",
"upperBoundType",
"(",
")",
"==",
"BoundType",
".",
"OPEN",
")",
"{",
"return",
"DiscreteDomain",
".",
"longs",
"(",
")",
".",
"previous",
... | Get the end of the range. Always use this method to get the end of a
range because it respects the bound type.
@param range
@return End of the range | [
"Get",
"the",
"end",
"of",
"the",
"range",
".",
"Always",
"use",
"this",
"method",
"to",
"get",
"the",
"end",
"of",
"a",
"range",
"because",
"it",
"respects",
"the",
"bound",
"type",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L69-L75 | train |
VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.append | public void append(long start, long end) {
assert(start <= end && (m_map.isEmpty() || start > end(m_map.span())));
addRange(start, end);
} | java | public void append(long start, long end) {
assert(start <= end && (m_map.isEmpty() || start > end(m_map.span())));
addRange(start, end);
} | [
"public",
"void",
"append",
"(",
"long",
"start",
",",
"long",
"end",
")",
"{",
"assert",
"(",
"start",
"<=",
"end",
"&&",
"(",
"m_map",
".",
"isEmpty",
"(",
")",
"||",
"start",
">",
"end",
"(",
"m_map",
".",
"span",
"(",
")",
")",
")",
")",
";... | Appends a range to the tracker. The range has to be after the last sequence number
of the tracker.
@param start
@param end | [
"Appends",
"a",
"range",
"to",
"the",
"tracker",
".",
"The",
"range",
"has",
"to",
"be",
"after",
"the",
"last",
"sequence",
"number",
"of",
"the",
"tracker",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L116-L119 | train |
VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.truncate | public int truncate(long newTruncationPoint) {
int truncated = 0;
if (m_map.isEmpty()) {
m_map.add(range(newTruncationPoint, newTruncationPoint));
m_hasSentinel = true;
return truncated;
}
if (newTruncationPoint < getFirstSeqNo()) {
return ... | java | public int truncate(long newTruncationPoint) {
int truncated = 0;
if (m_map.isEmpty()) {
m_map.add(range(newTruncationPoint, newTruncationPoint));
m_hasSentinel = true;
return truncated;
}
if (newTruncationPoint < getFirstSeqNo()) {
return ... | [
"public",
"int",
"truncate",
"(",
"long",
"newTruncationPoint",
")",
"{",
"int",
"truncated",
"=",
"0",
";",
"if",
"(",
"m_map",
".",
"isEmpty",
"(",
")",
")",
"{",
"m_map",
".",
"add",
"(",
"range",
"(",
"newTruncationPoint",
",",
"newTruncationPoint",
... | Truncate the tracker to the given safe point. After truncation, the new
safe point will be the first sequence number of the tracker. If the new safe point
is before the first sequence number of the tracker, it's a no-op. If the
map is empty, truncation point will be the new safe point of tracker.
@param newTruncationPo... | [
"Truncate",
"the",
"tracker",
"to",
"the",
"given",
"safe",
"point",
".",
"After",
"truncation",
"the",
"new",
"safe",
"point",
"will",
"be",
"the",
"first",
"sequence",
"number",
"of",
"the",
"tracker",
".",
"If",
"the",
"new",
"safe",
"point",
"is",
"b... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L129-L164 | train |
VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.truncateAfter | public void truncateAfter(long newTruncationPoint) {
if (size() == 0) {
m_map.add(range(newTruncationPoint, newTruncationPoint));
m_hasSentinel = true;
return;
}
if (newTruncationPoint > getLastSeqNo()) {
return;
}
final Iterator<Ra... | java | public void truncateAfter(long newTruncationPoint) {
if (size() == 0) {
m_map.add(range(newTruncationPoint, newTruncationPoint));
m_hasSentinel = true;
return;
}
if (newTruncationPoint > getLastSeqNo()) {
return;
}
final Iterator<Ra... | [
"public",
"void",
"truncateAfter",
"(",
"long",
"newTruncationPoint",
")",
"{",
"if",
"(",
"size",
"(",
")",
"==",
"0",
")",
"{",
"m_map",
".",
"add",
"(",
"range",
"(",
"newTruncationPoint",
",",
"newTruncationPoint",
")",
")",
";",
"m_hasSentinel",
"=",
... | Truncate the tracker to the given truncation point. After truncation,
any ranges after the new truncation point will be removed.
If the new safe point is after the last sequence number of the tracker,
it's a no-op. If the map is empty, truncation point will be the new safe point of tracker.
@param newTruncationPoint ... | [
"Truncate",
"the",
"tracker",
"to",
"the",
"given",
"truncation",
"point",
".",
"After",
"truncation",
"any",
"ranges",
"after",
"the",
"new",
"truncation",
"point",
"will",
"be",
"removed",
".",
"If",
"the",
"new",
"safe",
"point",
"is",
"after",
"the",
"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L173-L199 | train |
VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.getRangeContaining | public Pair<Long, Long> getRangeContaining(long seq) {
Range<Long> range = m_map.rangeContaining(seq);
if (range != null) {
return new Pair<Long, Long>(start(range), end(range));
}
return null;
} | java | public Pair<Long, Long> getRangeContaining(long seq) {
Range<Long> range = m_map.rangeContaining(seq);
if (range != null) {
return new Pair<Long, Long>(start(range), end(range));
}
return null;
} | [
"public",
"Pair",
"<",
"Long",
",",
"Long",
">",
"getRangeContaining",
"(",
"long",
"seq",
")",
"{",
"Range",
"<",
"Long",
">",
"range",
"=",
"m_map",
".",
"rangeContaining",
"(",
"seq",
")",
";",
"if",
"(",
"range",
"!=",
"null",
")",
"{",
"return",... | Get range that contains given sequence number
@param seq
@return a pair of start and end sequence number of the range if it exists,
otherwise return null | [
"Get",
"range",
"that",
"contains",
"given",
"sequence",
"number"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L227-L233 | train |
VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.getFirstGap | public Pair<Long, Long> getFirstGap() {
if (m_map.isEmpty() || size() < 2) {
return null;
}
Iterator<Range<Long>> iter = m_map.asRanges().iterator();
long start = end(iter.next()) + 1;
long end = start(iter.next()) - 1;
return new Pair<Long, Long>(start, end);... | java | public Pair<Long, Long> getFirstGap() {
if (m_map.isEmpty() || size() < 2) {
return null;
}
Iterator<Range<Long>> iter = m_map.asRanges().iterator();
long start = end(iter.next()) + 1;
long end = start(iter.next()) - 1;
return new Pair<Long, Long>(start, end);... | [
"public",
"Pair",
"<",
"Long",
",",
"Long",
">",
"getFirstGap",
"(",
")",
"{",
"if",
"(",
"m_map",
".",
"isEmpty",
"(",
")",
"||",
"size",
"(",
")",
"<",
"2",
")",
"{",
"return",
"null",
";",
"}",
"Iterator",
"<",
"Range",
"<",
"Long",
">",
">"... | Find range of the first gap if it exists.
If there is only one entry, range after the first entry is NOT a gap.
@return start and end sequence number of the first gap, if gap doesn't
exist return null | [
"Find",
"range",
"of",
"the",
"first",
"gap",
"if",
"it",
"exists",
".",
"If",
"there",
"is",
"only",
"one",
"entry",
"range",
"after",
"the",
"first",
"entry",
"is",
"NOT",
"a",
"gap",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L251-L259 | train |
VoltDB/voltdb | src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java | ExportSequenceNumberTracker.sizeInSequence | public int sizeInSequence() {
int sequence = 0;
if (m_map.isEmpty()) {
return sequence;
}
final Iterator<Range<Long>> iter = m_map.asRanges().iterator();
while (iter.hasNext()) {
Range<Long> range = iter.next();
sequence += end(range) - start(r... | java | public int sizeInSequence() {
int sequence = 0;
if (m_map.isEmpty()) {
return sequence;
}
final Iterator<Range<Long>> iter = m_map.asRanges().iterator();
while (iter.hasNext()) {
Range<Long> range = iter.next();
sequence += end(range) - start(r... | [
"public",
"int",
"sizeInSequence",
"(",
")",
"{",
"int",
"sequence",
"=",
"0",
";",
"if",
"(",
"m_map",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"sequence",
";",
"}",
"final",
"Iterator",
"<",
"Range",
"<",
"Long",
">",
">",
"iter",
"=",
"m_ma... | Get total number of sequence from the tracker.
@return | [
"Get",
"total",
"number",
"of",
"sequence",
"from",
"the",
"tracker",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/export/ExportSequenceNumberTracker.java#L285-L299 | train |
VoltDB/voltdb | examples/callcenter/client/callcenter/CallCenterApp.java | CallCenterApp.sendEvent | void sendEvent(CallEvent call) throws NoConnectionsException, IOException, ProcCallException {
if (call.endTS == null) {
assert(call.startTS != null);
// null callback isn't ideal for production code, but errors are tracked
// here through client stats so we'll let it slide
... | java | void sendEvent(CallEvent call) throws NoConnectionsException, IOException, ProcCallException {
if (call.endTS == null) {
assert(call.startTS != null);
// null callback isn't ideal for production code, but errors are tracked
// here through client stats so we'll let it slide
... | [
"void",
"sendEvent",
"(",
"CallEvent",
"call",
")",
"throws",
"NoConnectionsException",
",",
"IOException",
",",
"ProcCallException",
"{",
"if",
"(",
"call",
".",
"endTS",
"==",
"null",
")",
"{",
"assert",
"(",
"call",
".",
"startTS",
"!=",
"null",
")",
";... | Send a call event to either BeginCall or EndCall based on the event.
@throws NoConnectionsException
@throws IOException
@throws ProcCallException | [
"Send",
"a",
"call",
"event",
"to",
"either",
"BeginCall",
"or",
"EndCall",
"based",
"on",
"the",
"event",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/examples/callcenter/client/callcenter/CallCenterApp.java#L285-L298 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlByteArrayOutputStream.java | HsqlByteArrayOutputStream.write | public void write(char[] c, int off, int len) {
ensureRoom(len * 2);
for (int i = off; i < len; i++) {
int v = c[i];
buffer[count++] = (byte) (v >>> 8);
buffer[count++] = (byte) v;
}
} | java | public void write(char[] c, int off, int len) {
ensureRoom(len * 2);
for (int i = off; i < len; i++) {
int v = c[i];
buffer[count++] = (byte) (v >>> 8);
buffer[count++] = (byte) v;
}
} | [
"public",
"void",
"write",
"(",
"char",
"[",
"]",
"c",
",",
"int",
"off",
",",
"int",
"len",
")",
"{",
"ensureRoom",
"(",
"len",
"*",
"2",
")",
";",
"for",
"(",
"int",
"i",
"=",
"off",
";",
"i",
"<",
"len",
";",
"i",
"++",
")",
"{",
"int",
... | additional public methods not in similar java.util classes | [
"additional",
"public",
"methods",
"not",
"in",
"similar",
"java",
".",
"util",
"classes"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/HsqlByteArrayOutputStream.java#L282-L292 | train |
VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/LoadMultipartitionTable.java | LoadMultipartitionTable.executeSQL | long executeSQL(boolean isFinal) throws VoltAbortException {
long count = 0;
VoltTable[] results = voltExecuteSQL(isFinal);
for (VoltTable result : results) {
long dmlUpdated = result.asScalarLong();
if (dmlUpdated == 0) {
throw new VoltAbortException("Ins... | java | long executeSQL(boolean isFinal) throws VoltAbortException {
long count = 0;
VoltTable[] results = voltExecuteSQL(isFinal);
for (VoltTable result : results) {
long dmlUpdated = result.asScalarLong();
if (dmlUpdated == 0) {
throw new VoltAbortException("Ins... | [
"long",
"executeSQL",
"(",
"boolean",
"isFinal",
")",
"throws",
"VoltAbortException",
"{",
"long",
"count",
"=",
"0",
";",
"VoltTable",
"[",
"]",
"results",
"=",
"voltExecuteSQL",
"(",
"isFinal",
")",
";",
"for",
"(",
"VoltTable",
"result",
":",
"results",
... | Execute a set of queued inserts. Ensure each insert successfully
inserts one row. Throw exception if not.
@return Count of rows inserted.
@throws VoltAbortException if any failure at all. | [
"Execute",
"a",
"set",
"of",
"queued",
"inserts",
".",
"Ensure",
"each",
"insert",
"successfully",
"inserts",
"one",
"row",
".",
"Throw",
"exception",
"if",
"not",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/LoadMultipartitionTable.java#L260-L274 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java | WrapperInvocationHandler._isCloseSurrogateMethod | protected static boolean _isCloseSurrogateMethod(final Class clazz,
final Method method) {
return ((Connection.class.isAssignableFrom(
clazz) || Statement.class.isAssignableFrom(
clazz)) && "close".equals(method.getName()));
} | java | protected static boolean _isCloseSurrogateMethod(final Class clazz,
final Method method) {
return ((Connection.class.isAssignableFrom(
clazz) || Statement.class.isAssignableFrom(
clazz)) && "close".equals(method.getName()));
} | [
"protected",
"static",
"boolean",
"_isCloseSurrogateMethod",
"(",
"final",
"Class",
"clazz",
",",
"final",
"Method",
"method",
")",
"{",
"return",
"(",
"(",
"Connection",
".",
"class",
".",
"isAssignableFrom",
"(",
"clazz",
")",
"||",
"Statement",
".",
"class"... | Simple test used only during static initialization.
@param clazz reflecting the given public member method
@param method to test
@return true if close() method of poolable class | [
"Simple",
"test",
"used",
"only",
"during",
"static",
"initialization",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java#L293-L299 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java | WrapperInvocationHandler._computeProxiedInterface | protected static Class[] _computeProxiedInterface(Object delegate) {
// NOTE: Order is important for XXXStatement.
if (delegate instanceof Array) {
return arrayInterface;
} else if (delegate instanceof Connection) {
return connectionInterface;
} else if (delegat... | java | protected static Class[] _computeProxiedInterface(Object delegate) {
// NOTE: Order is important for XXXStatement.
if (delegate instanceof Array) {
return arrayInterface;
} else if (delegate instanceof Connection) {
return connectionInterface;
} else if (delegat... | [
"protected",
"static",
"Class",
"[",
"]",
"_computeProxiedInterface",
"(",
"Object",
"delegate",
")",
"{",
"// NOTE: Order is important for XXXStatement.",
"if",
"(",
"delegate",
"instanceof",
"Array",
")",
"{",
"return",
"arrayInterface",
";",
"}",
"else",
"if",
"... | Given a delegate, retrieves the interface that must be implemented by a
surrogate dynamic proxy to ensure pooling sensitive methods
of the delegate are not exposed directly to clients.
@param delegate the target delegate of interest
@return the interface that must be implemented by a surrogate dynamic
proxy to ensure ... | [
"Given",
"a",
"delegate",
"retrieves",
"the",
"interface",
"that",
"must",
"be",
"implemented",
"by",
"a",
"surrogate",
"dynamic",
"proxy",
"to",
"ensure",
"pooling",
"sensitive",
"methods",
"of",
"the",
"delegate",
"are",
"not",
"exposed",
"directly",
"to",
"... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java#L413-L433 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java | WrapperInvocationHandler.closeConnectionSurrogate | protected void closeConnectionSurrogate() throws Throwable {
ConnectionPool connectionPool = this.connectionPool;
if (connectionPool == null) {
// CHECKME: policy?
// pool has "disapeared" or was never provided (why?): should
// "really" close the connection since ... | java | protected void closeConnectionSurrogate() throws Throwable {
ConnectionPool connectionPool = this.connectionPool;
if (connectionPool == null) {
// CHECKME: policy?
// pool has "disapeared" or was never provided (why?): should
// "really" close the connection since ... | [
"protected",
"void",
"closeConnectionSurrogate",
"(",
")",
"throws",
"Throwable",
"{",
"ConnectionPool",
"connectionPool",
"=",
"this",
".",
"connectionPool",
";",
"if",
"(",
"connectionPool",
"==",
"null",
")",
"{",
"// CHECKME: policy?",
"// pool has \"disapeared\" or... | Does work toward enabling reuse of the delegate,
when it is a Connection.
@throws java.lang.Throwable the exception, if any, thrown by
returning the delegate connection to the ConnectionPool
designated at construction of the connection's
invocation handler. | [
"Does",
"work",
"toward",
"enabling",
"reuse",
"of",
"the",
"delegate",
"when",
"it",
"is",
"a",
"Connection",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/jdbc/pool/WrapperInvocationHandler.java#L764-L784 | train |
VoltDB/voltdb | src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java | DRIDTrackerHelper.jsonifyClusterTrackers | public static String jsonifyClusterTrackers(Pair<Long, Long> lastConsumerUniqueIds,
Map<Integer, Map<Integer, DRSiteDrIdTracker>> allProducerTrackers)
throws JSONException {
JSONStringer stringer = new JSONStringer();
stringer.object();
stringe... | java | public static String jsonifyClusterTrackers(Pair<Long, Long> lastConsumerUniqueIds,
Map<Integer, Map<Integer, DRSiteDrIdTracker>> allProducerTrackers)
throws JSONException {
JSONStringer stringer = new JSONStringer();
stringer.object();
stringe... | [
"public",
"static",
"String",
"jsonifyClusterTrackers",
"(",
"Pair",
"<",
"Long",
",",
"Long",
">",
"lastConsumerUniqueIds",
",",
"Map",
"<",
"Integer",
",",
"Map",
"<",
"Integer",
",",
"DRSiteDrIdTracker",
">",
">",
"allProducerTrackers",
")",
"throws",
"JSONEx... | Serialize the cluster trackers into JSON.
@param lastConsumerUniqueIds UniqueIDs recorded on each consumer partition.
@param allProducerTrackers All producer cluster trackers retrieved from each consumer partition.
@return A JSON string containing all information in the parameters.
@throws JSONException | [
"Serialize",
"the",
"cluster",
"trackers",
"into",
"JSON",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java#L47-L68 | train |
VoltDB/voltdb | src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java | DRIDTrackerHelper.dejsonifyClusterTrackers | public static Map<Integer, Map<Integer, DRSiteDrIdTracker>> dejsonifyClusterTrackers(final String jsonData, boolean resetLastReceivedLogIds)
throws JSONException
{
Map<Integer, Map<Integer, DRSiteDrIdTracker>> producerTrackers = new HashMap<>();
JSONObject clusterData = new JSONObject(jsonData)... | java | public static Map<Integer, Map<Integer, DRSiteDrIdTracker>> dejsonifyClusterTrackers(final String jsonData, boolean resetLastReceivedLogIds)
throws JSONException
{
Map<Integer, Map<Integer, DRSiteDrIdTracker>> producerTrackers = new HashMap<>();
JSONObject clusterData = new JSONObject(jsonData)... | [
"public",
"static",
"Map",
"<",
"Integer",
",",
"Map",
"<",
"Integer",
",",
"DRSiteDrIdTracker",
">",
">",
"dejsonifyClusterTrackers",
"(",
"final",
"String",
"jsonData",
",",
"boolean",
"resetLastReceivedLogIds",
")",
"throws",
"JSONException",
"{",
"Map",
"<",
... | Deserialize the trackers retrieved from each consumer partitions.
@param jsonData Tracker data retrieved from each consumer partition.
@param partitionsMissingTracker
@return A map of producer cluster ID to tracker for each producer
partition. If no tracker information is found, the map will be empty.
@throws JSONExce... | [
"Deserialize",
"the",
"trackers",
"retrieved",
"from",
"each",
"consumer",
"partitions",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java#L79-L104 | train |
VoltDB/voltdb | src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java | DRIDTrackerHelper.mergeTrackers | public static void mergeTrackers(Map<Integer, Map<Integer, DRSiteDrIdTracker>> base,
Map<Integer, Map<Integer, DRSiteDrIdTracker>> add)
{
for (Map.Entry<Integer, Map<Integer, DRSiteDrIdTracker>> clusterEntry : add.entrySet()) {
final Map<Integer, DRSiteDrIdTr... | java | public static void mergeTrackers(Map<Integer, Map<Integer, DRSiteDrIdTracker>> base,
Map<Integer, Map<Integer, DRSiteDrIdTracker>> add)
{
for (Map.Entry<Integer, Map<Integer, DRSiteDrIdTracker>> clusterEntry : add.entrySet()) {
final Map<Integer, DRSiteDrIdTr... | [
"public",
"static",
"void",
"mergeTrackers",
"(",
"Map",
"<",
"Integer",
",",
"Map",
"<",
"Integer",
",",
"DRSiteDrIdTracker",
">",
">",
"base",
",",
"Map",
"<",
"Integer",
",",
"Map",
"<",
"Integer",
",",
"DRSiteDrIdTracker",
">",
">",
"add",
")",
"{",
... | Merge trackers in the additional map into the base map.
@param base The base map to merge trackers into.
@param add The additional trackers to merge. | [
"Merge",
"trackers",
"in",
"the",
"additional",
"map",
"into",
"the",
"base",
"map",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/dr2/DRIDTrackerHelper.java#L111-L129 | train |
VoltDB/voltdb | third_party/java/src/org/json_voltpatches/JSONWriter.java | JSONWriter.array | public JSONWriter array(Iterable<? extends JSONString> iter) throws JSONException {
array();
for (JSONString element : iter) {
value(element);
}
endArray();
return this;
} | java | public JSONWriter array(Iterable<? extends JSONString> iter) throws JSONException {
array();
for (JSONString element : iter) {
value(element);
}
endArray();
return this;
} | [
"public",
"JSONWriter",
"array",
"(",
"Iterable",
"<",
"?",
"extends",
"JSONString",
">",
"iter",
")",
"throws",
"JSONException",
"{",
"array",
"(",
")",
";",
"for",
"(",
"JSONString",
"element",
":",
"iter",
")",
"{",
"value",
"(",
"element",
")",
";",
... | Append an array value based on a custom JSONString implementation.
@param jss The JSONString array or container to append.
Its elements can be null or implement JSONString.
@return this
@throws JSONException if the value is out of sequence or if a
toJSONString method throws an Exception or
if the writer throws an IOExc... | [
"Append",
"an",
"array",
"value",
"based",
"on",
"a",
"custom",
"JSONString",
"implementation",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/json_voltpatches/JSONWriter.java#L453-L460 | train |
VoltDB/voltdb | third_party/java/src/org/json_voltpatches/JSONWriter.java | JSONWriter.keySymbolValuePair | public JSONWriter keySymbolValuePair(String aKey, String aValue)
throws JSONException {
assert(aKey != null);
assert(m_mode == 'k');
// The key should not have already been seen in this scope.
assert(m_scopeStack[m_top].add(aKey));
try {
m_writer.write(m_... | java | public JSONWriter keySymbolValuePair(String aKey, String aValue)
throws JSONException {
assert(aKey != null);
assert(m_mode == 'k');
// The key should not have already been seen in this scope.
assert(m_scopeStack[m_top].add(aKey));
try {
m_writer.write(m_... | [
"public",
"JSONWriter",
"keySymbolValuePair",
"(",
"String",
"aKey",
",",
"String",
"aValue",
")",
"throws",
"JSONException",
"{",
"assert",
"(",
"aKey",
"!=",
"null",
")",
";",
"assert",
"(",
"m_mode",
"==",
"'",
"'",
")",
";",
"// The key should not have alr... | Write a JSON key-value pair in one optimized step that assumes that
the key is a symbol composed of normal characters requiring no escaping
and asserts that keys are non-null and unique within an object ONLY if
asserts are enabled. This method is most suitable in the common case
where the caller is making a hard-coded ... | [
"Write",
"a",
"JSON",
"key",
"-",
"value",
"pair",
"in",
"one",
"optimized",
"step",
"that",
"assumes",
"that",
"the",
"key",
"is",
"a",
"symbol",
"composed",
"of",
"normal",
"characters",
"requiring",
"no",
"escaping",
"and",
"asserts",
"that",
"keys",
"a... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/third_party/java/src/org/json_voltpatches/JSONWriter.java#L475-L499 | train |
VoltDB/voltdb | src/frontend/org/voltdb/client/HashinatorLite.java | HashinatorLite.gunzipBytes | public static byte[] gunzipBytes(byte[] compressedBytes) throws IOException
{
ByteArrayOutputStream bos = new ByteArrayOutputStream((int)(compressedBytes.length * 1.5));
InflaterOutputStream dos = new InflaterOutputStream(bos);
dos.write(compressedBytes);
dos.close();
return ... | java | public static byte[] gunzipBytes(byte[] compressedBytes) throws IOException
{
ByteArrayOutputStream bos = new ByteArrayOutputStream((int)(compressedBytes.length * 1.5));
InflaterOutputStream dos = new InflaterOutputStream(bos);
dos.write(compressedBytes);
dos.close();
return ... | [
"public",
"static",
"byte",
"[",
"]",
"gunzipBytes",
"(",
"byte",
"[",
"]",
"compressedBytes",
")",
"throws",
"IOException",
"{",
"ByteArrayOutputStream",
"bos",
"=",
"new",
"ByteArrayOutputStream",
"(",
"(",
"int",
")",
"(",
"compressedBytes",
".",
"length",
... | to avoid linking all that jazz into the client code | [
"to",
"avoid",
"linking",
"all",
"that",
"jazz",
"into",
"the",
"client",
"code"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/client/HashinatorLite.java#L276-L283 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigatorData.java | RowSetNavigatorData.getGroupData | public Object[] getGroupData(Object[] data) {
if (isSimpleAggregate) {
if (simpleAggregateData == null) {
simpleAggregateData = data;
return null;
}
return simpleAggregateData;
}
RowIterator it = groupIndex.findFirstRow(sess... | java | public Object[] getGroupData(Object[] data) {
if (isSimpleAggregate) {
if (simpleAggregateData == null) {
simpleAggregateData = data;
return null;
}
return simpleAggregateData;
}
RowIterator it = groupIndex.findFirstRow(sess... | [
"public",
"Object",
"[",
"]",
"getGroupData",
"(",
"Object",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"isSimpleAggregate",
")",
"{",
"if",
"(",
"simpleAggregateData",
"==",
"null",
")",
"{",
"simpleAggregateData",
"=",
"data",
";",
"return",
"null",
";",
"... | Special case for isSimpleAggregate cannot use index lookup. | [
"Special",
"case",
"for",
"isSimpleAggregate",
"cannot",
"use",
"index",
"lookup",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/navigator/RowSetNavigatorData.java#L570-L595 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.addConstraint | public void addConstraint(Constraint c) {
int index = c.getConstraintType() == Constraint.PRIMARY_KEY ? 0
: constraintList
.length;
constraintList =
(... | java | public void addConstraint(Constraint c) {
int index = c.getConstraintType() == Constraint.PRIMARY_KEY ? 0
: constraintList
.length;
constraintList =
(... | [
"public",
"void",
"addConstraint",
"(",
"Constraint",
"c",
")",
"{",
"int",
"index",
"=",
"c",
".",
"getConstraintType",
"(",
")",
"==",
"Constraint",
".",
"PRIMARY_KEY",
"?",
"0",
":",
"constraintList",
".",
"length",
";",
"constraintList",
"=",
"(",
"Con... | Adds a constraint. | [
"Adds",
"a",
"constraint",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L620-L631 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getUniqueConstraintForColumns | Constraint getUniqueConstraintForColumns(int[] cols) {
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.isUniqueWithColumns(cols)) {
return c;
}
}
return null;
} | java | Constraint getUniqueConstraintForColumns(int[] cols) {
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.isUniqueWithColumns(cols)) {
return c;
}
}
return null;
} | [
"Constraint",
"getUniqueConstraintForColumns",
"(",
"int",
"[",
"]",
"cols",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"constraintList",
".",
"length",
";",
"i",
"<",
"size",
";",
"i",
"++",
")",
"{",
"Constraint",
"c",
"=",
"cons... | Returns the UNIQUE or PK constraint with the given column signature. | [
"Returns",
"the",
"UNIQUE",
"or",
"PK",
"constraint",
"with",
"the",
"given",
"column",
"signature",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L789-L800 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getUniqueConstraintForColumns | Constraint getUniqueConstraintForColumns(int[] mainTableCols,
int[] refTableCols) {
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
// A VoltDB extension -- Don't consider non-column expression indexes for this purpose
... | java | Constraint getUniqueConstraintForColumns(int[] mainTableCols,
int[] refTableCols) {
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
// A VoltDB extension -- Don't consider non-column expression indexes for this purpose
... | [
"Constraint",
"getUniqueConstraintForColumns",
"(",
"int",
"[",
"]",
"mainTableCols",
",",
"int",
"[",
"]",
"refTableCols",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"constraintList",
".",
"length",
";",
"i",
"<",
"size",
";",
"i",
... | Returns the UNIQUE or PK constraint with the given column signature.
Modifies the composition of refTableCols if necessary. | [
"Returns",
"the",
"UNIQUE",
"or",
"PK",
"constraint",
"with",
"the",
"given",
"column",
"signature",
".",
"Modifies",
"the",
"composition",
"of",
"refTableCols",
"if",
"necessary",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L806-L851 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getFKConstraintForColumns | Constraint getFKConstraintForColumns(Table tableMain, int[] mainCols,
int[] refCols) {
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.isEquivalent(tableMain, mainCols, this, refCols)) {
... | java | Constraint getFKConstraintForColumns(Table tableMain, int[] mainCols,
int[] refCols) {
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.isEquivalent(tableMain, mainCols, this, refCols)) {
... | [
"Constraint",
"getFKConstraintForColumns",
"(",
"Table",
"tableMain",
",",
"int",
"[",
"]",
"mainCols",
",",
"int",
"[",
"]",
"refCols",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"constraintList",
".",
"length",
";",
"i",
"<",
"size... | Returns any foreign key constraint equivalent to the column sets | [
"Returns",
"any",
"foreign",
"key",
"constraint",
"equivalent",
"to",
"the",
"column",
"sets"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L856-L868 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getUniqueOrPKConstraintForIndex | public Constraint getUniqueOrPKConstraintForIndex(Index index) {
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.getMainIndex() == index
&& (c.getConstraintType() == Constraint.UNIQUE
|| ... | java | public Constraint getUniqueOrPKConstraintForIndex(Index index) {
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.getMainIndex() == index
&& (c.getConstraintType() == Constraint.UNIQUE
|| ... | [
"public",
"Constraint",
"getUniqueOrPKConstraintForIndex",
"(",
"Index",
"index",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"constraintList",
".",
"length",
";",
"i",
"<",
"size",
";",
"i",
"++",
")",
"{",
"Constraint",
"c",
"=",
"c... | Returns any unique Constraint using this index
@param index | [
"Returns",
"any",
"unique",
"Constraint",
"using",
"this",
"index"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L875-L888 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getNextConstraintIndex | int getNextConstraintIndex(int from, int type) {
for (int i = from, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.getConstraintType() == type) {
return i;
}
}
return -1;
} | java | int getNextConstraintIndex(int from, int type) {
for (int i = from, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.getConstraintType() == type) {
return i;
}
}
return -1;
} | [
"int",
"getNextConstraintIndex",
"(",
"int",
"from",
",",
"int",
"type",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"from",
",",
"size",
"=",
"constraintList",
".",
"length",
";",
"i",
"<",
"size",
";",
"i",
"++",
")",
"{",
"Constraint",
"c",
"=",
"con... | Returns the next constraint of a given type
@param from
@param type | [
"Returns",
"the",
"next",
"constraint",
"of",
"a",
"given",
"type"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L896-L907 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.addColumn | public void addColumn(ColumnSchema column) {
String name = column.getName().name;
if (findColumn(name) >= 0) {
throw Error.error(ErrorCode.X_42504, name);
}
if (column.isIdentity()) {
if (identityColumn != -1) {
throw Error.error(ErrorCode.X_425... | java | public void addColumn(ColumnSchema column) {
String name = column.getName().name;
if (findColumn(name) >= 0) {
throw Error.error(ErrorCode.X_42504, name);
}
if (column.isIdentity()) {
if (identityColumn != -1) {
throw Error.error(ErrorCode.X_425... | [
"public",
"void",
"addColumn",
"(",
"ColumnSchema",
"column",
")",
"{",
"String",
"name",
"=",
"column",
".",
"getName",
"(",
")",
".",
"name",
";",
"if",
"(",
"findColumn",
"(",
"name",
")",
">=",
"0",
")",
"{",
"throw",
"Error",
".",
"error",
"(",
... | Performs the table level checks and adds a column to the table at the
DDL level. Only used at table creation, not at alter column. | [
"Performs",
"the",
"table",
"level",
"checks",
"and",
"adds",
"a",
"column",
"to",
"the",
"table",
"at",
"the",
"DDL",
"level",
".",
"Only",
"used",
"at",
"table",
"creation",
"not",
"at",
"alter",
"column",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L913-L931 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.checkColumnsMatch | void checkColumnsMatch(int[] col, Table other, int[] othercol) {
for (int i = 0; i < col.length; i++) {
Type type = colTypes[col[i]];
Type otherType = other.colTypes[othercol[i]];
if (type.typeComparisonGroup != otherType.typeComparisonGroup) {
throw Er... | java | void checkColumnsMatch(int[] col, Table other, int[] othercol) {
for (int i = 0; i < col.length; i++) {
Type type = colTypes[col[i]];
Type otherType = other.colTypes[othercol[i]];
if (type.typeComparisonGroup != otherType.typeComparisonGroup) {
throw Er... | [
"void",
"checkColumnsMatch",
"(",
"int",
"[",
"]",
"col",
",",
"Table",
"other",
",",
"int",
"[",
"]",
"othercol",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"col",
".",
"length",
";",
"i",
"++",
")",
"{",
"Type",
"type",
"=",
... | Match two valid, equal length, columns arrays for type of columns
@param col column array from this Table
@param other the other Table object
@param othercol column array from the other Table | [
"Match",
"two",
"valid",
"equal",
"length",
"columns",
"arrays",
"for",
"type",
"of",
"columns"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L963-L973 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getDependentConstraints | OrderedHashSet getDependentConstraints(int colIndex) {
OrderedHashSet set = new OrderedHashSet();
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.hasColumnOnly(colIndex)) {
set.add(c);
}
... | java | OrderedHashSet getDependentConstraints(int colIndex) {
OrderedHashSet set = new OrderedHashSet();
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.hasColumnOnly(colIndex)) {
set.add(c);
}
... | [
"OrderedHashSet",
"getDependentConstraints",
"(",
"int",
"colIndex",
")",
"{",
"OrderedHashSet",
"set",
"=",
"new",
"OrderedHashSet",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"constraintList",
".",
"length",
";",
"i",
"<",
"size",... | Returns list of constraints dependent only on one column | [
"Returns",
"list",
"of",
"constraints",
"dependent",
"only",
"on",
"one",
"column"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1160-L1173 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getContainingConstraints | OrderedHashSet getContainingConstraints(int colIndex) {
OrderedHashSet set = new OrderedHashSet();
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.hasColumnPlus(colIndex)) {
set.add(c);
}
... | java | OrderedHashSet getContainingConstraints(int colIndex) {
OrderedHashSet set = new OrderedHashSet();
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.hasColumnPlus(colIndex)) {
set.add(c);
}
... | [
"OrderedHashSet",
"getContainingConstraints",
"(",
"int",
"colIndex",
")",
"{",
"OrderedHashSet",
"set",
"=",
"new",
"OrderedHashSet",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"constraintList",
".",
"length",
";",
"i",
"<",
"size"... | Returns list of constraints dependent on more than one column | [
"Returns",
"list",
"of",
"constraints",
"dependent",
"on",
"more",
"than",
"one",
"column"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1178-L1191 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getDependentConstraints | OrderedHashSet getDependentConstraints(Constraint constraint) {
OrderedHashSet set = new OrderedHashSet();
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.getConstraintType() == Constraint.MAIN) {
if (c.cor... | java | OrderedHashSet getDependentConstraints(Constraint constraint) {
OrderedHashSet set = new OrderedHashSet();
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.getConstraintType() == Constraint.MAIN) {
if (c.cor... | [
"OrderedHashSet",
"getDependentConstraints",
"(",
"Constraint",
"constraint",
")",
"{",
"OrderedHashSet",
"set",
"=",
"new",
"OrderedHashSet",
"(",
")",
";",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"constraintList",
".",
"length",
";",
"i",
"<",
... | Returns list of MAIN constraints dependent on this PK or UNIQUE constraint | [
"Returns",
"list",
"of",
"MAIN",
"constraints",
"dependent",
"on",
"this",
"PK",
"or",
"UNIQUE",
"constraint"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1211-L1226 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.checkColumnInFKConstraint | void checkColumnInFKConstraint(int colIndex, int actionType) {
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.getConstraintType() == Constraint.FOREIGN_KEY
&& c.hasColumn(colIndex)
&& (actio... | java | void checkColumnInFKConstraint(int colIndex, int actionType) {
for (int i = 0, size = constraintList.length; i < size; i++) {
Constraint c = constraintList[i];
if (c.getConstraintType() == Constraint.FOREIGN_KEY
&& c.hasColumn(colIndex)
&& (actio... | [
"void",
"checkColumnInFKConstraint",
"(",
"int",
"colIndex",
",",
"int",
"actionType",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"constraintList",
".",
"length",
";",
"i",
"<",
"size",
";",
"i",
"++",
")",
"{",
"Constraint",
"c",
... | Used for column defaults and nullability. Checks whether column is in an
FK with a given referential action type.
@param colIndex index of column
@param actionType referential action of the FK | [
"Used",
"for",
"column",
"defaults",
"and",
"nullability",
".",
"Checks",
"whether",
"column",
"is",
"in",
"an",
"FK",
"with",
"a",
"given",
"referential",
"action",
"type",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1253-L1268 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getColumnIndex | public int getColumnIndex(String name) {
int i = findColumn(name);
if (i == -1) {
throw Error.error(ErrorCode.X_42501, name);
}
return i;
} | java | public int getColumnIndex(String name) {
int i = findColumn(name);
if (i == -1) {
throw Error.error(ErrorCode.X_42501, name);
}
return i;
} | [
"public",
"int",
"getColumnIndex",
"(",
"String",
"name",
")",
"{",
"int",
"i",
"=",
"findColumn",
"(",
"name",
")",
";",
"if",
"(",
"i",
"==",
"-",
"1",
")",
"{",
"throw",
"Error",
".",
"error",
"(",
"ErrorCode",
".",
"X_42501",
",",
"name",
")",
... | Returns the index of given column name or throws if not found | [
"Returns",
"the",
"index",
"of",
"given",
"column",
"name",
"or",
"throws",
"if",
"not",
"found"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1280-L1289 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.setDefaultExpression | void setDefaultExpression(int columnIndex, Expression def) {
ColumnSchema column = getColumn(columnIndex);
column.setDefaultExpression(def);
setColumnTypeVars(columnIndex);
} | java | void setDefaultExpression(int columnIndex, Expression def) {
ColumnSchema column = getColumn(columnIndex);
column.setDefaultExpression(def);
setColumnTypeVars(columnIndex);
} | [
"void",
"setDefaultExpression",
"(",
"int",
"columnIndex",
",",
"Expression",
"def",
")",
"{",
"ColumnSchema",
"column",
"=",
"getColumn",
"(",
"columnIndex",
")",
";",
"column",
".",
"setDefaultExpression",
"(",
"def",
")",
";",
"setColumnTypeVars",
"(",
"colum... | Sets the SQL default value for a columm. | [
"Sets",
"the",
"SQL",
"default",
"value",
"for",
"a",
"columm",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1304-L1310 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.resetDefaultsFlag | void resetDefaultsFlag() {
hasDefaultValues = false;
for (int i = 0; i < colDefaults.length; i++) {
hasDefaultValues = hasDefaultValues || colDefaults[i] != null;
}
} | java | void resetDefaultsFlag() {
hasDefaultValues = false;
for (int i = 0; i < colDefaults.length; i++) {
hasDefaultValues = hasDefaultValues || colDefaults[i] != null;
}
} | [
"void",
"resetDefaultsFlag",
"(",
")",
"{",
"hasDefaultValues",
"=",
"false",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"colDefaults",
".",
"length",
";",
"i",
"++",
")",
"{",
"hasDefaultValues",
"=",
"hasDefaultValues",
"||",
"colDefaults",
... | sets the flag for the presence of any default expression | [
"sets",
"the",
"flag",
"for",
"the",
"presence",
"of",
"any",
"default",
"expression"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1315-L1322 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getIndexForColumn | Index getIndexForColumn(int col) {
int i = bestIndexForColumn[col];
return i == -1 ? null
: this.indexList[i];
} | java | Index getIndexForColumn(int col) {
int i = bestIndexForColumn[col];
return i == -1 ? null
: this.indexList[i];
} | [
"Index",
"getIndexForColumn",
"(",
"int",
"col",
")",
"{",
"int",
"i",
"=",
"bestIndexForColumn",
"[",
"col",
"]",
";",
"return",
"i",
"==",
"-",
"1",
"?",
"null",
":",
"this",
".",
"indexList",
"[",
"i",
"]",
";",
"}"
] | Finds an existing index for a column | [
"Finds",
"an",
"existing",
"index",
"for",
"a",
"column"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1335-L1341 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.createPrimaryKey | public void createPrimaryKey(HsqlName indexName, int[] columns,
boolean columnsNotNull) {
if (primaryKeyCols != null) {
throw Error.runtimeError(ErrorCode.U_S0500, "Table");
}
if (columns == null) {
columns = ValuePool.emptyIntArray;
... | java | public void createPrimaryKey(HsqlName indexName, int[] columns,
boolean columnsNotNull) {
if (primaryKeyCols != null) {
throw Error.runtimeError(ErrorCode.U_S0500, "Table");
}
if (columns == null) {
columns = ValuePool.emptyIntArray;
... | [
"public",
"void",
"createPrimaryKey",
"(",
"HsqlName",
"indexName",
",",
"int",
"[",
"]",
"columns",
",",
"boolean",
"columnsNotNull",
")",
"{",
"if",
"(",
"primaryKeyCols",
"!=",
"null",
")",
"{",
"throw",
"Error",
".",
"runtimeError",
"(",
"ErrorCode",
"."... | Creates a single or multi-column primary key and index. sets the
colTypes array. Finalises the creation of the table. (fredt@users) | [
"Creates",
"a",
"single",
"or",
"multi",
"-",
"column",
"primary",
"key",
"and",
"index",
".",
"sets",
"the",
"colTypes",
"array",
".",
"Finalises",
"the",
"creation",
"of",
"the",
"table",
".",
"(",
"fredt"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1396-L1432 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.addTrigger | void addTrigger(TriggerDef td, HsqlName otherName) {
int index = triggerList.length;
if (otherName != null) {
int pos = getTriggerIndex(otherName.name);
if (pos != -1) {
index = pos + 1;
}
}
triggerList = (TriggerDef[]) ArrayUtil.to... | java | void addTrigger(TriggerDef td, HsqlName otherName) {
int index = triggerList.length;
if (otherName != null) {
int pos = getTriggerIndex(otherName.name);
if (pos != -1) {
index = pos + 1;
}
}
triggerList = (TriggerDef[]) ArrayUtil.to... | [
"void",
"addTrigger",
"(",
"TriggerDef",
"td",
",",
"HsqlName",
"otherName",
")",
"{",
"int",
"index",
"=",
"triggerList",
".",
"length",
";",
"if",
"(",
"otherName",
"!=",
"null",
")",
"{",
"int",
"pos",
"=",
"getTriggerIndex",
"(",
"otherName",
".",
"n... | Adds a trigger. | [
"Adds",
"a",
"trigger",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1601-L1634 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getTrigger | TriggerDef getTrigger(String name) {
for (int i = triggerList.length - 1; i >= 0; i--) {
if (triggerList[i].name.name.equals(name)) {
return triggerList[i];
}
}
return null;
} | java | TriggerDef getTrigger(String name) {
for (int i = triggerList.length - 1; i >= 0; i--) {
if (triggerList[i].name.name.equals(name)) {
return triggerList[i];
}
}
return null;
} | [
"TriggerDef",
"getTrigger",
"(",
"String",
"name",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"triggerList",
".",
"length",
"-",
"1",
";",
"i",
">=",
"0",
";",
"i",
"--",
")",
"{",
"if",
"(",
"triggerList",
"[",
"i",
"]",
".",
"name",
".",
"name",
... | Returns a trigger. | [
"Returns",
"a",
"trigger",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1639-L1648 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.removeTrigger | void removeTrigger(String name) {
TriggerDef td = null;
for (int i = 0; i < triggerList.length; i++) {
td = triggerList[i];
if (td.name.name.equals(name)) {
td.terminate();
triggerList =
(TriggerDef[]) ArrayUtil.toAdjustedAr... | java | void removeTrigger(String name) {
TriggerDef td = null;
for (int i = 0; i < triggerList.length; i++) {
td = triggerList[i];
if (td.name.name.equals(name)) {
td.terminate();
triggerList =
(TriggerDef[]) ArrayUtil.toAdjustedAr... | [
"void",
"removeTrigger",
"(",
"String",
"name",
")",
"{",
"TriggerDef",
"td",
"=",
"null",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"triggerList",
".",
"length",
";",
"i",
"++",
")",
"{",
"td",
"=",
"triggerList",
"[",
"i",
"]",
";",... | Drops a trigger. | [
"Drops",
"a",
"trigger",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1664-L1701 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.releaseTriggers | void releaseTriggers() {
// look in each trigger list of each type of trigger
for (int i = 0; i < TriggerDef.NUM_TRIGS; i++) {
for (int j = 0; j < triggerLists[i].length; j++) {
triggerLists[i][j].terminate();
}
triggerLists[i] = TriggerDef.emptyArra... | java | void releaseTriggers() {
// look in each trigger list of each type of trigger
for (int i = 0; i < TriggerDef.NUM_TRIGS; i++) {
for (int j = 0; j < triggerLists[i].length; j++) {
triggerLists[i][j].terminate();
}
triggerLists[i] = TriggerDef.emptyArra... | [
"void",
"releaseTriggers",
"(",
")",
"{",
"// look in each trigger list of each type of trigger",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"TriggerDef",
".",
"NUM_TRIGS",
";",
"i",
"++",
")",
"{",
"for",
"(",
"int",
"j",
"=",
"0",
";",
"j",
"<",
... | Drops all triggers. | [
"Drops",
"all",
"triggers",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1706-L1716 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getIndexIndex | int getIndexIndex(String indexName) {
Index[] indexes = indexList;
for (int i = 0; i < indexes.length; i++) {
if (indexName.equals(indexes[i].getName().name)) {
return i;
}
}
// no such index
return -1;
} | java | int getIndexIndex(String indexName) {
Index[] indexes = indexList;
for (int i = 0; i < indexes.length; i++) {
if (indexName.equals(indexes[i].getName().name)) {
return i;
}
}
// no such index
return -1;
} | [
"int",
"getIndexIndex",
"(",
"String",
"indexName",
")",
"{",
"Index",
"[",
"]",
"indexes",
"=",
"indexList",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"indexes",
".",
"length",
";",
"i",
"++",
")",
"{",
"if",
"(",
"indexName",
".",
"... | Returns the index of the Index object of the given name or -1 if not found. | [
"Returns",
"the",
"index",
"of",
"the",
"Index",
"object",
"of",
"the",
"given",
"name",
"or",
"-",
"1",
"if",
"not",
"found",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1721-L1733 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getIndex | Index getIndex(String indexName) {
Index[] indexes = indexList;
int i = getIndexIndex(indexName);
return i == -1 ? null
: indexes[i];
} | java | Index getIndex(String indexName) {
Index[] indexes = indexList;
int i = getIndexIndex(indexName);
return i == -1 ? null
: indexes[i];
} | [
"Index",
"getIndex",
"(",
"String",
"indexName",
")",
"{",
"Index",
"[",
"]",
"indexes",
"=",
"indexList",
";",
"int",
"i",
"=",
"getIndexIndex",
"(",
"indexName",
")",
";",
"return",
"i",
"==",
"-",
"1",
"?",
"null",
":",
"indexes",
"[",
"i",
"]",
... | Returns the Index object of the given name or null if not found. | [
"Returns",
"the",
"Index",
"object",
"of",
"the",
"given",
"name",
"or",
"null",
"if",
"not",
"found",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1738-L1745 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getConstraintIndex | int getConstraintIndex(String constraintName) {
for (int i = 0, size = constraintList.length; i < size; i++) {
if (constraintList[i].getName().name.equals(constraintName)) {
return i;
}
}
return -1;
} | java | int getConstraintIndex(String constraintName) {
for (int i = 0, size = constraintList.length; i < size; i++) {
if (constraintList[i].getName().name.equals(constraintName)) {
return i;
}
}
return -1;
} | [
"int",
"getConstraintIndex",
"(",
"String",
"constraintName",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
",",
"size",
"=",
"constraintList",
".",
"length",
";",
"i",
"<",
"size",
";",
"i",
"++",
")",
"{",
"if",
"(",
"constraintList",
"[",
"i",
"]",
... | Return the position of the constraint within the list | [
"Return",
"the",
"position",
"of",
"the",
"constraint",
"within",
"the",
"list"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1750-L1759 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getConstraint | public Constraint getConstraint(String constraintName) {
int i = getConstraintIndex(constraintName);
return (i < 0) ? null
: constraintList[i];
} | java | public Constraint getConstraint(String constraintName) {
int i = getConstraintIndex(constraintName);
return (i < 0) ? null
: constraintList[i];
} | [
"public",
"Constraint",
"getConstraint",
"(",
"String",
"constraintName",
")",
"{",
"int",
"i",
"=",
"getConstraintIndex",
"(",
"constraintName",
")",
";",
"return",
"(",
"i",
"<",
"0",
")",
"?",
"null",
":",
"constraintList",
"[",
"i",
"]",
";",
"}"
] | return the named constriant | [
"return",
"the",
"named",
"constriant"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1764-L1770 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.createIndexForColumns | Index createIndexForColumns(int[] columns) {
HsqlName indexName = database.nameManager.newAutoName("IDX_T",
getSchemaName(), getName(), SchemaObject.INDEX);
try {
Index index = createAndAddIndexStructure(indexName, columns, null,
null, false, false, false, false... | java | Index createIndexForColumns(int[] columns) {
HsqlName indexName = database.nameManager.newAutoName("IDX_T",
getSchemaName(), getName(), SchemaObject.INDEX);
try {
Index index = createAndAddIndexStructure(indexName, columns, null,
null, false, false, false, false... | [
"Index",
"createIndexForColumns",
"(",
"int",
"[",
"]",
"columns",
")",
"{",
"HsqlName",
"indexName",
"=",
"database",
".",
"nameManager",
".",
"newAutoName",
"(",
"\"IDX_T\"",
",",
"getSchemaName",
"(",
")",
",",
"getName",
"(",
")",
",",
"SchemaObject",
".... | Used to create an index automatically for system tables. | [
"Used",
"to",
"create",
"an",
"index",
"automatically",
"for",
"system",
"tables",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1845-L1858 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.enforceRowConstraints | void enforceRowConstraints(Session session, Object[] data) {
for (int i = 0; i < defaultColumnMap.length; i++) {
Type type = colTypes[i];
data[i] = type.convertToTypeLimits(session, data[i]);
if (type.isDomainType()) {
Constraint[] constraints =
... | java | void enforceRowConstraints(Session session, Object[] data) {
for (int i = 0; i < defaultColumnMap.length; i++) {
Type type = colTypes[i];
data[i] = type.convertToTypeLimits(session, data[i]);
if (type.isDomainType()) {
Constraint[] constraints =
... | [
"void",
"enforceRowConstraints",
"(",
"Session",
"session",
",",
"Object",
"[",
"]",
"data",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"defaultColumnMap",
".",
"length",
";",
"i",
"++",
")",
"{",
"Type",
"type",
"=",
"colTypes",
"[",... | Enforce max field sizes according to SQL column definition.
SQL92 13.8 | [
"Enforce",
"max",
"field",
"sizes",
"according",
"to",
"SQL",
"column",
"definition",
".",
"SQL92",
"13",
".",
"8"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L1960-L1996 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getIndexForColumns | Index getIndexForColumns(int[] cols) {
int i = bestIndexForColumn[cols[0]];
if (i > -1) {
return indexList[i];
}
switch (tableType) {
case TableBase.SYSTEM_SUBQUERY :
case TableBase.SYSTEM_TABLE :
case TableBase.VIEW_TABLE :
... | java | Index getIndexForColumns(int[] cols) {
int i = bestIndexForColumn[cols[0]];
if (i > -1) {
return indexList[i];
}
switch (tableType) {
case TableBase.SYSTEM_SUBQUERY :
case TableBase.SYSTEM_TABLE :
case TableBase.VIEW_TABLE :
... | [
"Index",
"getIndexForColumns",
"(",
"int",
"[",
"]",
"cols",
")",
"{",
"int",
"i",
"=",
"bestIndexForColumn",
"[",
"cols",
"[",
"0",
"]",
"]",
";",
"if",
"(",
"i",
">",
"-",
"1",
")",
"{",
"return",
"indexList",
"[",
"i",
"]",
";",
"}",
"switch",... | Finds an existing index for a column group | [
"Finds",
"an",
"existing",
"index",
"for",
"a",
"column",
"group"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2001-L2022 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getIndexForColumns | Index getIndexForColumns(OrderedIntHashSet set) {
int maxMatchCount = 0;
Index selected = null;
if (set.isEmpty()) {
return null;
}
for (int i = 0, count = indexList.length; i < count; i++) {
Index currentindex = getIndex(i);
int[] in... | java | Index getIndexForColumns(OrderedIntHashSet set) {
int maxMatchCount = 0;
Index selected = null;
if (set.isEmpty()) {
return null;
}
for (int i = 0, count = indexList.length; i < count; i++) {
Index currentindex = getIndex(i);
int[] in... | [
"Index",
"getIndexForColumns",
"(",
"OrderedIntHashSet",
"set",
")",
"{",
"int",
"maxMatchCount",
"=",
"0",
";",
"Index",
"selected",
"=",
"null",
";",
"if",
"(",
"set",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"for",
"(",
"int",... | Finds an existing index for a column set or create one for temporary
tables | [
"Finds",
"an",
"existing",
"index",
"for",
"a",
"column",
"set",
"or",
"create",
"one",
"for",
"temporary",
"tables"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2028-L2071 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.getIndexRootsArray | public final int[] getIndexRootsArray() {
PersistentStore store =
database.persistentStoreCollection.getStore(this);
int[] roots = new int[getIndexCount()];
for (int i = 0; i < getIndexCount(); i++) {
CachedObject accessor = store.getAccessor(indexList[i]);
... | java | public final int[] getIndexRootsArray() {
PersistentStore store =
database.persistentStoreCollection.getStore(this);
int[] roots = new int[getIndexCount()];
for (int i = 0; i < getIndexCount(); i++) {
CachedObject accessor = store.getAccessor(indexList[i]);
... | [
"public",
"final",
"int",
"[",
"]",
"getIndexRootsArray",
"(",
")",
"{",
"PersistentStore",
"store",
"=",
"database",
".",
"persistentStoreCollection",
".",
"getStore",
"(",
"this",
")",
";",
"int",
"[",
"]",
"roots",
"=",
"new",
"int",
"[",
"getIndexCount",... | Return the list of file pointers to root nodes for this table's
indexes. | [
"Return",
"the",
"list",
"of",
"file",
"pointers",
"to",
"root",
"nodes",
"for",
"this",
"table",
"s",
"indexes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2077-L2091 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.setIndexRoots | void setIndexRoots(Session session, String s) {
if (!isCached) {
throw Error.error(ErrorCode.X_42501, tableName.name);
}
ParserDQL p = new ParserDQL(session, new Scanner(s));
int[] roots = new int[getIndexCount()];
p.read();
for (int i = 0; i < get... | java | void setIndexRoots(Session session, String s) {
if (!isCached) {
throw Error.error(ErrorCode.X_42501, tableName.name);
}
ParserDQL p = new ParserDQL(session, new Scanner(s));
int[] roots = new int[getIndexCount()];
p.read();
for (int i = 0; i < get... | [
"void",
"setIndexRoots",
"(",
"Session",
"session",
",",
"String",
"s",
")",
"{",
"if",
"(",
"!",
"isCached",
")",
"{",
"throw",
"Error",
".",
"error",
"(",
"ErrorCode",
".",
"X_42501",
",",
"tableName",
".",
"name",
")",
";",
"}",
"ParserDQL",
"p",
... | Sets the index roots and next identity. | [
"Sets",
"the",
"index",
"roots",
"and",
"next",
"identity",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2134-L2152 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.dropIndex | public void dropIndex(Session session, String indexname) {
// find the array index for indexname and remove
int todrop = getIndexIndex(indexname);
indexList = (Index[]) ArrayUtil.toAdjustedArray(indexList, null,
todrop, -1);
for (int i = 0; i < indexList.length; i++) {... | java | public void dropIndex(Session session, String indexname) {
// find the array index for indexname and remove
int todrop = getIndexIndex(indexname);
indexList = (Index[]) ArrayUtil.toAdjustedArray(indexList, null,
todrop, -1);
for (int i = 0; i < indexList.length; i++) {... | [
"public",
"void",
"dropIndex",
"(",
"Session",
"session",
",",
"String",
"indexname",
")",
"{",
"// find the array index for indexname and remove",
"int",
"todrop",
"=",
"getIndexIndex",
"(",
"indexname",
")",
";",
"indexList",
"=",
"(",
"Index",
"[",
"]",
")",
... | Performs Table structure modification and changes to the index nodes
to remove a given index from a MEMORY or TEXT table. Not for PK index. | [
"Performs",
"Table",
"structure",
"modification",
"and",
"changes",
"to",
"the",
"index",
"nodes",
"to",
"remove",
"a",
"given",
"index",
"from",
"a",
"MEMORY",
"or",
"TEXT",
"table",
".",
"Not",
"for",
"PK",
"index",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2159-L2176 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.insertRow | void insertRow(Session session, PersistentStore store, Object[] data) {
setIdentityColumn(session, data);
if (triggerLists[Trigger.INSERT_BEFORE].length != 0) {
fireBeforeTriggers(session, Trigger.INSERT_BEFORE, null, data,
null);
}
if (isVie... | java | void insertRow(Session session, PersistentStore store, Object[] data) {
setIdentityColumn(session, data);
if (triggerLists[Trigger.INSERT_BEFORE].length != 0) {
fireBeforeTriggers(session, Trigger.INSERT_BEFORE, null, data,
null);
}
if (isVie... | [
"void",
"insertRow",
"(",
"Session",
"session",
",",
"PersistentStore",
"store",
",",
"Object",
"[",
"]",
"data",
")",
"{",
"setIdentityColumn",
"(",
"session",
",",
"data",
")",
";",
"if",
"(",
"triggerLists",
"[",
"Trigger",
".",
"INSERT_BEFORE",
"]",
".... | Mid level method for inserting rows. Performs constraint checks and
fires row level triggers. | [
"Mid",
"level",
"method",
"for",
"inserting",
"rows",
".",
"Performs",
"constraint",
"checks",
"and",
"fires",
"row",
"level",
"triggers",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2241-L2256 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.insertIntoTable | void insertIntoTable(Session session, Result result) {
PersistentStore store = session.sessionData.getRowStore(this);
RowSetNavigator nav = result.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = nav.getNext();
Object[] newData =
(Object[... | java | void insertIntoTable(Session session, Result result) {
PersistentStore store = session.sessionData.getRowStore(this);
RowSetNavigator nav = result.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = nav.getNext();
Object[] newData =
(Object[... | [
"void",
"insertIntoTable",
"(",
"Session",
"session",
",",
"Result",
"result",
")",
"{",
"PersistentStore",
"store",
"=",
"session",
".",
"sessionData",
".",
"getRowStore",
"(",
"this",
")",
";",
"RowSetNavigator",
"nav",
"=",
"result",
".",
"initialiseNavigator... | Multi-row insert method. Used for CREATE TABLE AS ... queries. | [
"Multi",
"-",
"row",
"insert",
"method",
".",
"Used",
"for",
"CREATE",
"TABLE",
"AS",
"...",
"queries",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2261-L2274 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.insertNoCheck | private Row insertNoCheck(Session session, PersistentStore store,
Object[] data) {
Row row = (Row) store.getNewCachedObject(session, data);
store.indexRow(session, row);
session.addInsertAction(this, row);
return row;
} | java | private Row insertNoCheck(Session session, PersistentStore store,
Object[] data) {
Row row = (Row) store.getNewCachedObject(session, data);
store.indexRow(session, row);
session.addInsertAction(this, row);
return row;
} | [
"private",
"Row",
"insertNoCheck",
"(",
"Session",
"session",
",",
"PersistentStore",
"store",
",",
"Object",
"[",
"]",
"data",
")",
"{",
"Row",
"row",
"=",
"(",
"Row",
")",
"store",
".",
"getNewCachedObject",
"(",
"session",
",",
"data",
")",
";",
"stor... | Low level method for row insert.
UNIQUE or PRIMARY constraints are enforced by attempting to
add the row to the indexes. | [
"Low",
"level",
"method",
"for",
"row",
"insert",
".",
"UNIQUE",
"or",
"PRIMARY",
"constraints",
"are",
"enforced",
"by",
"attempting",
"to",
"add",
"the",
"row",
"to",
"the",
"indexes",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2281-L2290 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.insertSys | public int insertSys(PersistentStore store, Result ins) {
RowSetNavigator nav = ins.getNavigator();
int count = 0;
while (nav.hasNext()) {
insertSys(store, nav.getNext());
count++;
}
return count;
} | java | public int insertSys(PersistentStore store, Result ins) {
RowSetNavigator nav = ins.getNavigator();
int count = 0;
while (nav.hasNext()) {
insertSys(store, nav.getNext());
count++;
}
return count;
} | [
"public",
"int",
"insertSys",
"(",
"PersistentStore",
"store",
",",
"Result",
"ins",
")",
"{",
"RowSetNavigator",
"nav",
"=",
"ins",
".",
"getNavigator",
"(",
")",
";",
"int",
"count",
"=",
"0",
";",
"while",
"(",
"nav",
".",
"hasNext",
"(",
")",
")",
... | Used for system table inserts. No checks. No identity
columns. | [
"Used",
"for",
"system",
"table",
"inserts",
".",
"No",
"checks",
".",
"No",
"identity",
"columns",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2310-L2322 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.insertResult | void insertResult(PersistentStore store, Result ins) {
RowSetNavigator nav = ins.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = nav.getNext();
Object[] newData =
(Object[]) ArrayUtil.resizeArrayIfDifferent(data,
getColumnCount... | java | void insertResult(PersistentStore store, Result ins) {
RowSetNavigator nav = ins.initialiseNavigator();
while (nav.hasNext()) {
Object[] data = nav.getNext();
Object[] newData =
(Object[]) ArrayUtil.resizeArrayIfDifferent(data,
getColumnCount... | [
"void",
"insertResult",
"(",
"PersistentStore",
"store",
",",
"Result",
"ins",
")",
"{",
"RowSetNavigator",
"nav",
"=",
"ins",
".",
"initialiseNavigator",
"(",
")",
";",
"while",
"(",
"nav",
".",
"hasNext",
"(",
")",
")",
"{",
"Object",
"[",
"]",
"data",... | Used for subquery inserts. No checks. No identity
columns. | [
"Used",
"for",
"subquery",
"inserts",
".",
"No",
"checks",
".",
"No",
"identity",
"columns",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2328-L2340 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.insertFromScript | public void insertFromScript(PersistentStore store, Object[] data) {
systemUpdateIdentityValue(data);
insertData(store, data);
} | java | public void insertFromScript(PersistentStore store, Object[] data) {
systemUpdateIdentityValue(data);
insertData(store, data);
} | [
"public",
"void",
"insertFromScript",
"(",
"PersistentStore",
"store",
",",
"Object",
"[",
"]",
"data",
")",
"{",
"systemUpdateIdentityValue",
"(",
"data",
")",
";",
"insertData",
"(",
"store",
",",
"data",
")",
";",
"}"
] | Not for general use.
Used by ScriptReader to unconditionally insert a row into
the table when the .script file is read. | [
"Not",
"for",
"general",
"use",
".",
"Used",
"by",
"ScriptReader",
"to",
"unconditionally",
"insert",
"a",
"row",
"into",
"the",
"table",
"when",
"the",
".",
"script",
"file",
"is",
"read",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2347-L2350 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.systemUpdateIdentityValue | protected void systemUpdateIdentityValue(Object[] data) {
if (identityColumn != -1) {
Number id = (Number) data[identityColumn];
if (id != null) {
identitySequence.systemUpdate(id.longValue());
}
}
} | java | protected void systemUpdateIdentityValue(Object[] data) {
if (identityColumn != -1) {
Number id = (Number) data[identityColumn];
if (id != null) {
identitySequence.systemUpdate(id.longValue());
}
}
} | [
"protected",
"void",
"systemUpdateIdentityValue",
"(",
"Object",
"[",
"]",
"data",
")",
"{",
"if",
"(",
"identityColumn",
"!=",
"-",
"1",
")",
"{",
"Number",
"id",
"=",
"(",
"Number",
")",
"data",
"[",
"identityColumn",
"]",
";",
"if",
"(",
"id",
"!=",... | If there is an identity column in the table, sets
the max identity value. | [
"If",
"there",
"is",
"an",
"identity",
"column",
"in",
"the",
"table",
"sets",
"the",
"max",
"identity",
"value",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2412-L2421 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.deleteNoRefCheck | void deleteNoRefCheck(Session session, Row row) {
Object[] data = row.getData();
fireBeforeTriggers(session, Trigger.DELETE_BEFORE, data, null, null);
if (isView) {
return;
}
deleteNoCheck(session, row);
} | java | void deleteNoRefCheck(Session session, Row row) {
Object[] data = row.getData();
fireBeforeTriggers(session, Trigger.DELETE_BEFORE, data, null, null);
if (isView) {
return;
}
deleteNoCheck(session, row);
} | [
"void",
"deleteNoRefCheck",
"(",
"Session",
"session",
",",
"Row",
"row",
")",
"{",
"Object",
"[",
"]",
"data",
"=",
"row",
".",
"getData",
"(",
")",
";",
"fireBeforeTriggers",
"(",
"session",
",",
"Trigger",
".",
"DELETE_BEFORE",
",",
"data",
",",
"null... | Mid level row delete method. Fires triggers but no integrity
constraint checks. | [
"Mid",
"level",
"row",
"delete",
"method",
".",
"Fires",
"triggers",
"but",
"no",
"integrity",
"constraint",
"checks",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2434-L2445 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.deleteNoCheck | private void deleteNoCheck(Session session, Row row) {
if (row.isDeleted(session)) {
return;
}
session.addDeleteAction(this, row);
} | java | private void deleteNoCheck(Session session, Row row) {
if (row.isDeleted(session)) {
return;
}
session.addDeleteAction(this, row);
} | [
"private",
"void",
"deleteNoCheck",
"(",
"Session",
"session",
",",
"Row",
"row",
")",
"{",
"if",
"(",
"row",
".",
"isDeleted",
"(",
"session",
")",
")",
"{",
"return",
";",
"}",
"session",
".",
"addDeleteAction",
"(",
"this",
",",
"row",
")",
";",
"... | Low level row delete method. Removes the row from the indexes and
from the Cache. | [
"Low",
"level",
"row",
"delete",
"method",
".",
"Removes",
"the",
"row",
"from",
"the",
"indexes",
"and",
"from",
"the",
"Cache",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2451-L2458 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.deleteNoCheckFromLog | public void deleteNoCheckFromLog(Session session, Object[] data) {
Row row = null;
PersistentStore store = session.sessionData.getRowStore(this);
if (hasPrimaryKey()) {
RowIterator it = getPrimaryIndex().findFirstRow(session, store,
data, primaryKeyCol... | java | public void deleteNoCheckFromLog(Session session, Object[] data) {
Row row = null;
PersistentStore store = session.sessionData.getRowStore(this);
if (hasPrimaryKey()) {
RowIterator it = getPrimaryIndex().findFirstRow(session, store,
data, primaryKeyCol... | [
"public",
"void",
"deleteNoCheckFromLog",
"(",
"Session",
"session",
",",
"Object",
"[",
"]",
"data",
")",
"{",
"Row",
"row",
"=",
"null",
";",
"PersistentStore",
"store",
"=",
"session",
".",
"sessionData",
".",
"getRowStore",
"(",
"this",
")",
";",
"if",... | For log statements. Delete a single row. | [
"For",
"log",
"statements",
".",
"Delete",
"a",
"single",
"row",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2463-L2521 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/Table.java | Table.addTTL | public void addTTL(int ttlValue, String ttlUnit, String ttlColumn, int batchSize,
int maxFrequency, String streamName) {
dropTTL();
timeToLive = new TimeToLiveVoltDB(ttlValue, ttlUnit, getColumn(findColumn(ttlColumn)),
batchSize, maxFrequency, streamName);
} | java | public void addTTL(int ttlValue, String ttlUnit, String ttlColumn, int batchSize,
int maxFrequency, String streamName) {
dropTTL();
timeToLive = new TimeToLiveVoltDB(ttlValue, ttlUnit, getColumn(findColumn(ttlColumn)),
batchSize, maxFrequency, streamName);
} | [
"public",
"void",
"addTTL",
"(",
"int",
"ttlValue",
",",
"String",
"ttlUnit",
",",
"String",
"ttlColumn",
",",
"int",
"batchSize",
",",
"int",
"maxFrequency",
",",
"String",
"streamName",
")",
"{",
"dropTTL",
"(",
")",
";",
"timeToLive",
"=",
"new",
"TimeT... | A VoltDB extension to support TTL | [
"A",
"VoltDB",
"extension",
"to",
"support",
"TTL"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/Table.java#L2771-L2776 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/TarHeaderFields.java | TarHeaderFields.getStart | static public int getStart(int field) {
Integer iObject = (Integer) starts.get(new Integer(field));
if (iObject == null) {
throw new IllegalArgumentException(
RB.singleton.getString(RB.UNEXPECTED_HEADER_KEY, field));
}
return iObject.intValue();
} | java | static public int getStart(int field) {
Integer iObject = (Integer) starts.get(new Integer(field));
if (iObject == null) {
throw new IllegalArgumentException(
RB.singleton.getString(RB.UNEXPECTED_HEADER_KEY, field));
}
return iObject.intValue();
} | [
"static",
"public",
"int",
"getStart",
"(",
"int",
"field",
")",
"{",
"Integer",
"iObject",
"=",
"(",
"Integer",
")",
"starts",
".",
"get",
"(",
"new",
"Integer",
"(",
"field",
")",
")",
";",
"if",
"(",
"iObject",
"==",
"null",
")",
"{",
"throw",
"... | not some problem with a Header, or generating or reading a Header. | [
"not",
"some",
"problem",
"with",
"a",
"Header",
"or",
"generating",
"or",
"reading",
"a",
"Header",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/lib/tar/TarHeaderFields.java#L161-L171 | train |
VoltDB/voltdb | src/frontend/org/voltdb/sysprocs/MigrateRowsBase.java | MigrateRowsBase.executePrecompiledSQL | VoltTable executePrecompiledSQL(Statement catStmt, Object[] params, boolean replicated)
throws VoltAbortException {
// Create a SQLStmt instance on the fly
// This is unusual to do, as they are typically required to be final instance variables.
// This only works because the SQL text... | java | VoltTable executePrecompiledSQL(Statement catStmt, Object[] params, boolean replicated)
throws VoltAbortException {
// Create a SQLStmt instance on the fly
// This is unusual to do, as they are typically required to be final instance variables.
// This only works because the SQL text... | [
"VoltTable",
"executePrecompiledSQL",
"(",
"Statement",
"catStmt",
",",
"Object",
"[",
"]",
"params",
",",
"boolean",
"replicated",
")",
"throws",
"VoltAbortException",
"{",
"// Create a SQLStmt instance on the fly",
"// This is unusual to do, as they are typically required to be... | Execute a pre-compiled adHoc SQL statement, throw exception if not.
@return Count of rows inserted or upserted.
@throws VoltAbortException if any failure at all. | [
"Execute",
"a",
"pre",
"-",
"compiled",
"adHoc",
"SQL",
"statement",
"throw",
"exception",
"if",
"not",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/sysprocs/MigrateRowsBase.java#L65-L78 | train |
VoltDB/voltdb | src/frontend/org/voltdb/ClientAppBase.java | ClientAppBase.printLogStatic | protected static void printLogStatic(String className, String msg, Object...args) {
if (args != null) {
msg = String.format(msg, args);
}
String header = String.format("%s [%s] ",
ZonedDateTime.now().format(TIME_FORMAT),
className);
System.out... | java | protected static void printLogStatic(String className, String msg, Object...args) {
if (args != null) {
msg = String.format(msg, args);
}
String header = String.format("%s [%s] ",
ZonedDateTime.now().format(TIME_FORMAT),
className);
System.out... | [
"protected",
"static",
"void",
"printLogStatic",
"(",
"String",
"className",
",",
"String",
"msg",
",",
"Object",
"...",
"args",
")",
"{",
"if",
"(",
"args",
"!=",
"null",
")",
"{",
"msg",
"=",
"String",
".",
"format",
"(",
"msg",
",",
"args",
")",
"... | The static method to print a log message to the console.
@param className Name of the class that prints this message.
@param msg The log message that needs to be printed.
@param args The arguments that may be needed for formatting the message. | [
"The",
"static",
"method",
"to",
"print",
"a",
"log",
"message",
"to",
"the",
"console",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/frontend/org/voltdb/ClientAppBase.java#L53-L63 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ParserRoutine.java | ParserRoutine.compileSetStatement | StatementSimple compileSetStatement(RangeVariable rangeVars[]) {
read();
OrderedHashSet colNames = new OrderedHashSet();
HsqlArrayList exprList = new HsqlArrayList();
readSetClauseList(rangeVars, colNames, exprList);
if (exprList.size() > 1) {
throw Error.error(E... | java | StatementSimple compileSetStatement(RangeVariable rangeVars[]) {
read();
OrderedHashSet colNames = new OrderedHashSet();
HsqlArrayList exprList = new HsqlArrayList();
readSetClauseList(rangeVars, colNames, exprList);
if (exprList.size() > 1) {
throw Error.error(E... | [
"StatementSimple",
"compileSetStatement",
"(",
"RangeVariable",
"rangeVars",
"[",
"]",
")",
"{",
"read",
"(",
")",
";",
"OrderedHashSet",
"colNames",
"=",
"new",
"OrderedHashSet",
"(",
")",
";",
"HsqlArrayList",
"exprList",
"=",
"new",
"HsqlArrayList",
"(",
")",... | Creates SET Statement for PSM from this parse context. | [
"Creates",
"SET",
"Statement",
"for",
"PSM",
"from",
"this",
"parse",
"context",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserRoutine.java#L178-L215 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/ParserRoutine.java | ParserRoutine.compileCreateProcedureOrFunction | StatementSchema compileCreateProcedureOrFunction() {
int routineType = token.tokenType == Tokens.PROCEDURE
? SchemaObject.PROCEDURE
: SchemaObject.FUNCTION;
HsqlName name;
read();
name = readNewSchemaObjectNameNoCheck(routineType);
... | java | StatementSchema compileCreateProcedureOrFunction() {
int routineType = token.tokenType == Tokens.PROCEDURE
? SchemaObject.PROCEDURE
: SchemaObject.FUNCTION;
HsqlName name;
read();
name = readNewSchemaObjectNameNoCheck(routineType);
... | [
"StatementSchema",
"compileCreateProcedureOrFunction",
"(",
")",
"{",
"int",
"routineType",
"=",
"token",
".",
"tokenType",
"==",
"Tokens",
".",
"PROCEDURE",
"?",
"SchemaObject",
".",
"PROCEDURE",
":",
"SchemaObject",
".",
"FUNCTION",
";",
"HsqlName",
"name",
";",... | SQL-invoked routine | [
"SQL",
"-",
"invoked",
"routine"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/ParserRoutine.java#L241-L348 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java | Log.close | void close(boolean script) {
closeLog();
deleteNewAndOldFiles();
writeScript(script);
closeAllTextCaches(script);
if (cache != null) {
cache.close(true);
}
properties.setProperty(HsqlDatabaseProperties.db_version,
Hsql... | java | void close(boolean script) {
closeLog();
deleteNewAndOldFiles();
writeScript(script);
closeAllTextCaches(script);
if (cache != null) {
cache.close(true);
}
properties.setProperty(HsqlDatabaseProperties.db_version,
Hsql... | [
"void",
"close",
"(",
"boolean",
"script",
")",
"{",
"closeLog",
"(",
")",
";",
"deleteNewAndOldFiles",
"(",
")",
";",
"writeScript",
"(",
"script",
")",
";",
"closeAllTextCaches",
"(",
"script",
")",
";",
"if",
"(",
"cache",
"!=",
"null",
")",
"{",
"c... | Close all the database files. If script argument is true, no .data
or .backup file will remain and the .script file will contain all the
data of the cached tables as well as memory tables.
This is not used for filesReadOnly databases which use shutdown. | [
"Close",
"all",
"the",
"database",
"files",
".",
"If",
"script",
"argument",
"is",
"true",
"no",
".",
"data",
"or",
".",
"backup",
"file",
"will",
"remain",
"and",
"the",
".",
"script",
"file",
"will",
"contain",
"all",
"the",
"data",
"of",
"the",
"cac... | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L253-L288 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java | Log.deleteNewAndOldFiles | void deleteNewAndOldFiles() {
fa.removeElement(fileName + ".data" + ".old");
fa.removeElement(fileName + ".data" + ".new");
fa.removeElement(fileName + ".backup" + ".new");
fa.removeElement(scriptFileName + ".new");
} | java | void deleteNewAndOldFiles() {
fa.removeElement(fileName + ".data" + ".old");
fa.removeElement(fileName + ".data" + ".new");
fa.removeElement(fileName + ".backup" + ".new");
fa.removeElement(scriptFileName + ".new");
} | [
"void",
"deleteNewAndOldFiles",
"(",
")",
"{",
"fa",
".",
"removeElement",
"(",
"fileName",
"+",
"\".data\"",
"+",
"\".old\"",
")",
";",
"fa",
".",
"removeElement",
"(",
"fileName",
"+",
"\".data\"",
"+",
"\".new\"",
")",
";",
"fa",
".",
"removeElement",
"... | Deletes the leftovers from any previous unfinished operations. | [
"Deletes",
"the",
"leftovers",
"from",
"any",
"previous",
"unfinished",
"operations",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L309-L315 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java | Log.forceDefrag | boolean forceDefrag() {
long megas = properties.getIntegerProperty(
HsqlDatabaseProperties.hsqldb_defrag_limit, 200);
long defraglimit = megas * 1024L * 1024;
long lostSize = cache.freeBlocks.getLostBlocksSize();
return lostSize > defraglimit;
} | java | boolean forceDefrag() {
long megas = properties.getIntegerProperty(
HsqlDatabaseProperties.hsqldb_defrag_limit, 200);
long defraglimit = megas * 1024L * 1024;
long lostSize = cache.freeBlocks.getLostBlocksSize();
return lostSize > defraglimit;
} | [
"boolean",
"forceDefrag",
"(",
")",
"{",
"long",
"megas",
"=",
"properties",
".",
"getIntegerProperty",
"(",
"HsqlDatabaseProperties",
".",
"hsqldb_defrag_limit",
",",
"200",
")",
";",
"long",
"defraglimit",
"=",
"megas",
"*",
"1024L",
"*",
"1024",
";",
"long"... | Returns true if lost space is above the threshold | [
"Returns",
"true",
"if",
"lost",
"space",
"is",
"above",
"the",
"threshold"
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L531-L539 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java | Log.getCache | DataFileCache getCache() {
/*
if (database.isFilesInJar()) {
return null;
}
*/
if (cache == null) {
cache = new DataFileCache(database, fileName);
cache.open(filesReadOnly);
}
return cache;
} | java | DataFileCache getCache() {
/*
if (database.isFilesInJar()) {
return null;
}
*/
if (cache == null) {
cache = new DataFileCache(database, fileName);
cache.open(filesReadOnly);
}
return cache;
} | [
"DataFileCache",
"getCache",
"(",
")",
"{",
"/*\n if (database.isFilesInJar()) {\n return null;\n }\n*/",
"if",
"(",
"cache",
"==",
"null",
")",
"{",
"cache",
"=",
"new",
"DataFileCache",
"(",
"database",
",",
"fileName",
")",
";",
"cache",
".... | Responsible for creating the cache instance. | [
"Responsible",
"for",
"creating",
"the",
"cache",
"instance",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L551-L565 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java | Log.setScriptType | void setScriptType(int type) {
// OOo related code
if (database.isStoredFileAccess()) {
return;
}
// OOo end
boolean needsCheckpoint = scriptFormat != type;
scriptFormat = type;
properties.setProperty(HsqlDatabaseProperties.hsqldb_script_format,
... | java | void setScriptType(int type) {
// OOo related code
if (database.isStoredFileAccess()) {
return;
}
// OOo end
boolean needsCheckpoint = scriptFormat != type;
scriptFormat = type;
properties.setProperty(HsqlDatabaseProperties.hsqldb_script_format,
... | [
"void",
"setScriptType",
"(",
"int",
"type",
")",
"{",
"// OOo related code",
"if",
"(",
"database",
".",
"isStoredFileAccess",
"(",
")",
")",
"{",
"return",
";",
"}",
"// OOo end",
"boolean",
"needsCheckpoint",
"=",
"scriptFormat",
"!=",
"type",
";",
"scriptF... | Changing the script format results in a checkpoint, with the .script
file written in the new format. | [
"Changing",
"the",
"script",
"format",
"results",
"in",
"a",
"checkpoint",
"with",
"the",
".",
"script",
"file",
"written",
"in",
"the",
"new",
"format",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L587-L605 | train |
VoltDB/voltdb | src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java | Log.writeScript | private void writeScript(boolean full) {
deleteNewScript();
//fredt - to do - flag for chache set index
ScriptWriterBase scw = ScriptWriterBase.newScriptWriter(database,
scriptFileName + ".new", full, true, scriptFormat);
scw.writeAll();
scw.close();
} | java | private void writeScript(boolean full) {
deleteNewScript();
//fredt - to do - flag for chache set index
ScriptWriterBase scw = ScriptWriterBase.newScriptWriter(database,
scriptFileName + ".new", full, true, scriptFormat);
scw.writeAll();
scw.close();
} | [
"private",
"void",
"writeScript",
"(",
"boolean",
"full",
")",
"{",
"deleteNewScript",
"(",
")",
";",
"//fredt - to do - flag for chache set index",
"ScriptWriterBase",
"scw",
"=",
"ScriptWriterBase",
".",
"newScriptWriter",
"(",
"database",
",",
"scriptFileName",
"+",
... | Write the .script file as .script.new. | [
"Write",
"the",
".",
"script",
"file",
"as",
".",
"script",
".",
"new",
"."
] | 8afc1031e475835344b5497ea9e7203bc95475ac | https://github.com/VoltDB/voltdb/blob/8afc1031e475835344b5497ea9e7203bc95475ac/src/hsqldb19b3/org/hsqldb_voltpatches/persist/Log.java#L753-L763 | train |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.