name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
morf_TableLoader_builder_rdh | /**
*
* @return A new {@link TableLoaderBuilder}.
*/
public static TableLoaderBuilder builder() {
return new TableLoaderBuilderImpl();
} | 3.26 |
morf_TableLoader_insertOrMergeRecords_rdh | /**
* Insert the records into the database using a {@link PreparedStatement}.
*
* @param records
* The records to insert
*/
private void insertOrMergeRecords(Iterable<Record> records) {
// Important: This transformation must be applied in a large-data-streaming-friendly fashion.
// FluentIterable.from()... | 3.26 |
morf_TableLoader_runRecoverably_rdh | /**
* PostgreSQL does not like failing commands, and marks connections as "dirty" after errors:
* <q>ERROR: current transaction is aborted, commands ignored until end of transaction block.</q>
*
* <p>To recover a connection, one has to issue a rollback.</p>
*
* @param runnable
*/
private void runRecoverably(Runn... | 3.26 |
morf_TableLoader_load_rdh | /**
* Load the specified records into the table.
*
* @param records
* the records to load.
*/
public void load(final Iterable<Record> records) {
if (truncateBeforeLoad) {truncate(table);
}
insertOrMergeRecords(records);
} | 3.26 |
morf_GraphBasedUpgradeTraversalService_create_rdh | /**
* Creates new {@link GraphBasedUpgradeTraversalService} for a given
* {@link GraphBasedUpgrade}.
*
* @param graphBasedUpgrade
* for which the service should be created
* @return new {@link GraphBasedUpgradeTraversalService} instance
*/
public GraphBasedUpgradeTraversalService create(GraphBasedUpgrade graph... | 3.26 |
morf_GraphBasedUpgradeTraversalService_allNodesCompletedNoLock_rdh | /**
*
* @return true if all nodes of the upgrade have been executed
*/private boolean allNodesCompletedNoLock() {
return graphBasedUpgrade.getNumberOfNodes() == completedNodes.size();
} | 3.26 |
morf_GraphBasedUpgradeTraversalService_nextNode_rdh | /**
*
* @return the next node to be executed if such node is available
*/
public Optional<GraphBasedUpgradeNode> nextNode() {
lock.lock();
try {
Optional<GraphBasedUpgradeNode> nextNode = readyToExecuteNodes.stream().min(Comparator.comparing(GraphBasedUpgradeNode::getSequence));
if
... | 3.26 |
morf_GraphBasedUpgradeTraversalService_waitForReadyToExecuteNode_rdh | /**
* Caller of this method will be blocked awaiting moment when at least one new
* node is available for execution or all the nodes of the upgrade have been
* executed. When the upgrade reaches that point the block will be released and
* the method will be completed. Note that the fact that at ... | 3.26 |
morf_GraphBasedUpgradeTraversalService_allNodesCompleted_rdh | /**
*
* @return true if all nodes of the upgrade have been executed
*/
public boolean
allNodesCompleted() {
lock.lock();
try {
return allNodesCompletedNoLock();
} finally { lock.unlock();
}
} | 3.26 |
morf_AbstractConnectionResources_sqlDialect_rdh | /**
*
* @see org.alfasoftware.morf.jdbc.ConnectionResources#sqlDialect()
*/@Override
public final SqlDialect
sqlDialect() {
return findDatabaseType().sqlDialect(getSchemaName());
} | 3.26 |
morf_AbstractConnectionResources_openSchemaResource_rdh | /**
*
* @see org.alfasoftware.morf.jdbc.ConnectionResources#openSchemaResource(DataSource)
*/
@Overridepublic final SchemaResource openSchemaResource(DataSource dataSource) {
return SchemaResourceImpl.create(dataSource, this);
} | 3.26 |
morf_AbstractConnectionResources_getXADataSource_rdh | /**
*
* @return {@link XADataSource} created for this {@link ConnectionResources}
*/
public final XADataSource getXADataSource() {Preconditions.checkNotNull(getDatabaseType(), "Cannot create XADataSource without defined DatabaseType");
return findDatabaseType().getXADataSource(getJdbcUrl(), getUserName(), getPas... | 3.26 |
morf_AbstractConnectionResources_getDataSource_rdh | /**
* {@inheritDoc }
*
* @see org.alfasoftware.morf.jdbc.ConnectionResources#getDataSource()
*/
@Override
public DataSource getDataSource() {
return new ConnectionDetailsDataSource();
} | 3.26 |
morf_AbstractConnectionResources_getConnection_rdh | /**
*
* @see javax.sql.DataSource#getConnection()
*/@Override
public Connection getConnection() throws SQLException {
return getConnection(AbstractConnectionResources.this.getUserName(), AbstractConnectionResources.this.getPassword());
} | 3.26 |
morf_UpdateStatementBuilder_getTable_rdh | /**
* Gets the table being inserted into
*
* @return the table being inserted into
*/
TableReference
getTable() {
return table;
} | 3.26 |
morf_UpdateStatementBuilder_set_rdh | /**
* Specifies the fields to set.
*
* @param destinationFields
* the fields to update in the database table
* @return this, for method chaining.
*/
public UpdateStatementBuilder set(AliasedFieldBuilder... destinationFields) {
this.fields.addAll(Builder.Helper.buildAll(Arrays.asList(destinationFields)));
... | 3.26 |
morf_UpdateStatementBuilder_useParallelDml_rdh | /**
* Request that this statement is executed with a parallel execution plan for data manipulation language (DML). This request will have no effect unless the database implementation supports it and the feature is enabled.
*
* <p>For statement that will affect a high percentage or rows in the table, a parallel execu... | 3.26 |
morf_UpdateStatementBuilder_getWhereCriterion_rdh | /**
* Gets the where criteria.
*
* @return the where criteria
*/
Criterion getWhereCriterion() {
return whereCriterion;} | 3.26 |
morf_UpdateStatementBuilder_getHints_rdh | /**
*
* @return all hints in the order they were declared.
*/
public List<Hint> getHints() {
return hints;
} | 3.26 |
morf_UpdateStatementBuilder_getFields_rdh | /**
* Gets the list of fields
*
* @return the fields
*/
List<AliasedField> getFields() {
return fields;
} | 3.26 |
morf_UpdateStatementBuilder_where_rdh | /**
* Specifies the where criteria
*
* <blockquote><pre>
* update([table])
* .set([fields])
* .where([criteria]);</pre></blockquote>
*
* @param criterion
* the criteria to filter the results by
* @return this, for method chaining.
*/public UpdateStatementBuilder where(Criterion criterion) {
... | 3.26 |
morf_SqlElementCallback_visit_rdh | /**
* Invoked on each element of the SQL statement that is being traversed.
* This similar to the Visitor pattern but ObjectTreeTraverser has the
* calling responsibility.
*
* @param object
* the object to invoke the callback on.
*/
@Override
public final void visit(Obje... | 3.26 |
morf_AuditRecordHelper_createAuditInsertStatement_rdh | /**
* Returns an {@link InsertStatement} used to be added to the upgrade audit table.
*
* @param uuid
* The UUID of the step which has been applied
* @param description
* The description of the step.
* @return The insert statement
*/
public static InsertStatement createAuditInsertStatement(UUID uuid, Strin... | 3.26 |
morf_SchemaResourceImpl_m0_rdh | /**
*
* @see org.alfasoftware.morf.metadata.SchemaResource#close()
*/
@Override
public void m0() {
try {
// restore auto-commit state
connection.commit();
connection.setAutoCommit(wasAutoCommit);
connection.close();} catch (SQLException e) {
t... | 3.26 |
morf_MorfModule_configure_rdh | /**
*
* @see com.google.inject.AbstractModule#configure()
*/
@Override
protected void configure() {Multibinder.newSetBinder(binder(), UpgradeScriptAddition.class);Multibinder<TableContribution> tableMultibinder = Multibinder.newSetBinder(binder(), TableContribution.class);
tableMultibinder.addBinding().to(Data... | 3.26 |
morf_MorfModule_provideUpgrade_rdh | /**
* Singleton provider creating an instance of {@link Upgrade}.
*
* @param connectionResources
* the connection resources
* @param factory
* the upgrade path factory
* @param upgradeStatusTableService
* the service class for managing the status of temporary upgrade ta... | 3.26 |
morf_GraphBasedUpgradeNode_addAllUpgradeStatements_rdh | /**
* Add upgrade statements to be executed by this upgrade node
*
* @param statements
* to be executed
*/
public void addAllUpgradeStatements(Collection<String> statements) {
upgradeStatements.addAll(statements);
} | 3.26 |
morf_GraphBasedUpgradeNode_m0_rdh | /**
*
* @return true if this node is a no-op root node of the graph
*/
public boolean m0() {
return sequence == 0;
} | 3.26 |
morf_GraphBasedUpgradeNode_getReads_rdh | /**
*
* @return all the tables which are read by this upgrade node
*/
public Set<String> getReads() {
return reads;
} | 3.26 |
morf_GraphBasedUpgradeNode_getName_rdh | /**
*
* @return name of the upgrade node
*/
public String getName() { return name;
} | 3.26 |
morf_GraphBasedUpgradeNode_getChildren_rdh | /**
*
* @return upgrade nodes which depend on this upgrade node
*/
public Set<GraphBasedUpgradeNode> getChildren() {
return children;
} | 3.26 |
morf_GraphBasedUpgradeNode_getModifies_rdh | /**
*
* @return all the tables which are modified by this upgrade node
*/
public Set<String> getModifies() {
return modifies;
} | 3.26 |
morf_GraphBasedUpgradeNode_hashCode_rdh | /**
* The hashCode of this class depends only on the name.
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result =
1;
result = (prime * result) + (name == null ? 0 : name.hashCode());
return result; } | 3.26 |
morf_GraphBasedUpgradeNode_getParents_rdh | /**
*
* @return upgrade nodes on which this upgrade node depends on
*/
public Set<GraphBasedUpgradeNode> getParents() {
return parents;
} | 3.26 |
morf_GraphBasedUpgradeNode_getUpgradeStatements_rdh | /**
*
* @return ordered list of statements to be executed by this upgrade node
*/
public List<String> getUpgradeStatements() {return upgradeStatements;
} | 3.26 |
morf_GraphBasedUpgradeNode_nodeListToStringOfNames_rdh | /**
*
* @param nodes
* @return String representation of the given nodes
*/private String nodeListToStringOfNames(Collection<GraphBasedUpgradeNode> nodes) {
return nodes.stream().map(n -> n.getName()).collect(Collectors.joining(", "));
} | 3.26 |
morf_GraphBasedUpgradeNode_addUpgradeStatements_rdh | /**
* Add upgrade statement to be executed by this upgrade node
*
* @param statement
* to be executed
*/
public void addUpgradeStatements(String statement) {
upgradeStatements.add(statement);
} | 3.26 |
morf_GraphBasedUpgradeNode_getSequence_rdh | /**
*
* @return sequence number
*/
public long getSequence() {
return sequence;
} | 3.26 |
morf_H2DatabaseInspector_inspect_rdh | /**
*
* @see org.alfasoftware.morf.diagnostics.DatabaseInspector#inspect()
*/
@Override
public void inspect() {
if ((connectionResources instanceof AbstractConnectionResources) && "H2".equals(connectionResources.getDatabaseType())) {
try {
log.info("Launching H2 database inspector...");
... | 3.26 |
morf_Upgrade_resultSetProcessor_rdh | /**
* Returns a ResultSetProcessor that processes a ResultSet into a Map<String, String>.
*
* @return A ResultSetProcessor that converts a ResultSet into a Map<String, String>.
*/
private ResultSetProcessor<Map<String, String>> resultSetProcessor() {
return resultSet -> {
Map<String, String>
upgradeAudit ... | 3.26 |
morf_Upgrade_findPath_rdh | /**
* Find an upgrade path.
*
* @param targetSchema
* Target schema to upgrade to.
* @param upgradeSteps
* All available upgrade steps.
* @param exceptionRegexes
* Regular expression for table exclusions.
* @param exclusiveExecutionSteps
* names of the upgrade step classes which should
* be execute... | 3.26 |
morf_Upgrade_getUpgradeAuditRowCount_rdh | /**
* Provides a number of already applied upgrade steps.
*
* @return the number of upgrade steps from the UpgradeAudit table
*/
long getUpgradeAuditRowCount(ResultSetProcessor<Long> processor) {
SelectStatement selectStatement = m0();
long appliedUpgradeStepsCount = -1;
... | 3.26 |
morf_Upgrade_m0_rdh | /**
* Creates a select statement which can be used to count the number of upgrade steps that have already been run
*/
private SelectStatement m0() {
TableReference upgradeAuditTable = tableRef(DatabaseUpgradeTableContribution.UPGRADE_AUDIT_NAME);
return select(count(upgradeAuditTable.field("upgradeUUID"))).from(upgr... | 3.26 |
morf_Upgrade_createPath_rdh | /**
* Static convenience method which creates the required {@link UpgradePath} to take the specified
* database and upgrade it to the target schema, using the upgrade steps supplied which have not
* already been applied. <b>This static context does not support Graph Based Upgrade.</b>
*
* @param targetSchema
* ... | 3.26 |
morf_Upgrade_buildUpgradePath_rdh | /**
* Turn the information gathered so far into an {@code UpgradePath}.
*
* @param connectionResources
* Database connection resources.
* @param sourceSchema
* Source schema.
* @param targetSchema
* ... | 3.26 |
morf_Upgrade_performUpgrade_rdh | /**
* Static convenience method which takes the specified database and upgrades it to the target
* schema, using the upgrade steps supplied which have not already been applied.
* <b>This static context does not support Graph Based Upgrade.</b>
*
* @param targetSchema
* The target database schema.
* @param upgr... | 3.26 |
morf_DatabaseDataSetProducer_close_rdh | /**
*
* @see org.alfasoftware.morf.dataset.DataSetProducer#close()
*/
@Override
public void close() {
if (connection == null) {
return;
}
try {
for (ResultSetIterator resultSetIterator : openResultSets) {
resultSetIterator.close();
}
openResultSets.clear();
... | 3.26 |
morf_DatabaseDataSetProducer_getSchema_rdh | /**
*
* @see org.alfasoftware.morf.dataset.DataSetProducer#getSchema()
*/@Override
public Schema getSchema() {if (connection == null) {
throw new IllegalStateException("Dataset has not been opened");
}
if (schema == null) {
// we use the same connection as this provider, so there is no (extr... | 3.26 |
morf_DatabaseDataSetProducer_records_rdh | /**
*
* @see org.alfasoftware.morf.dataset.DataSetProducer#records(java.lang.String)
*/
@Override
public Iterable<Record> records(String tableName) {
final Table table = getSchema().getTable(tableName);
return new Iterable<Record>() {
@Override
public Iterator<Record> iterator() {
... | 3.26 |
morf_DatabaseDataSetProducer_open_rdh | /**
*
* @see org.alfasoftware.morf.dataset.DataSetProducer#open()
*/
@Overridepublic void open() {
try {
this.connection = dataSource.getConnection();
this.wasAutoCommit = connection.getAutoCommit();
// disable auto-commit on this connection for HSQLDB ... | 3.26 |
morf_XmlDataSetProducer_getSchema_rdh | /**
*
* @see org.alfasoftware.morf.dataset.DataSetProducer#getSchema()
*/
@Override
public Schema getSchema() {
return new PullProcessorMetaDataProvider(xmlStreamProvider);
} | 3.26 |
morf_XmlDataSetProducer_openPullParser_rdh | /**
*
* @param inputStream
* The inputstream to read from
* @return A new pull parser
*/
private static XMLStreamReader openPullParser(InputStream inputStream) {
try {
BufferedReader bufferedReader = new BufferedReader(new InputStreamReader(inputStream, Charsets.UTF_8));
Reader reader;
int versio... | 3.26 |
morf_XmlDataSetProducer_m1_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Schema#getView(java.lang.String)
*/
@Override
public View m1(String name) {
throw new IllegalArgumentException(("No view named [" + name) + "]. Views not supported in XML datasets");
} | 3.26 |
morf_XmlDataSetProducer_getDefaultValue_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Column#getDefaultValue()
*/@Override
public String getDefaultValue() {
return defaultValue;
} | 3.26 |
morf_XmlDataSetProducer_getWidth_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Column#getWidth()
*/
@Override
public int getWidth()
{
if (width == null) {
return 0;
}
return width;} | 3.26 |
morf_XmlDataSetProducer_records_rdh | /**
*
* @see org.alfasoftware.morf.dataset.DataSetProducer#records(java.lang.String)
*/
@Override
public Iterable<Record> records(final String tableName) {
return new Iterable<>() {
@Override
public Iterator<Record> iterator() {
final InputStream inputStream = xmlStreamProvi... | 3.26 |
morf_XmlDataSetProducer_open_rdh | /**
* Creates an XML pull parser based on the XML reader specified at
* construction.
*
* @see org.alfasoftware.morf.dataset.DataSetProducer#open()
*/
@Override
public void open() {xmlStreamProvider.open();
} | 3.26 |
morf_XmlDataSetProducer_viewExists_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Schema#viewExists(java.lang.String)
*/
@Override
public boolean viewExists(String name) {
return false;
} | 3.26 |
morf_XmlDataSetProducer_isAutoNumbered_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Column#isAutoNumbered()
*/
@Override
public boolean isAutoNumbered() {
return autonumbered;
} | 3.26 |
morf_XmlDataSetProducer_next_rdh | /**
*
* @see java.util.Iterator#next()
*/
@Override
public Record next() {
if (hasNext()) {
// Buffer this record
RecordBuilder result = DataSetUtils.record();
for (Entry<String, String> columnNameAndUpperCase : columnNamesAndUpperCase.entrySet()) {result.setString(columnNameAndUpperCase... | 3.26 |
morf_XmlDataSetProducer_remove_rdh | /**
*
* @see java.util.Iterator#remove()
*/@Override
public void remove() {
throw new UnsupportedOperationException("Cannot remove item from a record iterator");
} | 3.26 |
morf_XmlDataSetProducer_m0_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Schema#isEmptyDatabase()
*/
@Override
public boolean m0()
{
return xmlStreamProvider.availableStreamNames().isEmpty();
} | 3.26 |
morf_XmlDataSetProducer_isTableEmpty_rdh | /**
*
* @see org.alfasoftware.morf.dataset.DataSetProducer#isTableEmpty(java.lang.String)
*/
@Override
public boolean isTableEmpty(String tableName) {
final InputStream inputStream = xmlStreamProvider.openInputStreamForTable(tableName);
try {
final XMLStreamReader pullParser = openPullParser(inputStream);
Pu... | 3.26 |
morf_XmlDataSetProducer_getUpperCaseName_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Column#getUpperCaseName()
*/
@Override
public String getUpperCaseName() {
return upperCaseColumnName.get();} | 3.26 |
morf_XmlDataSetProducer_tableExists_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Schema#tableExists(java.lang.String)
*/
@Override
public boolean tableExists(String name) {
return xmlStreamProvider.tableExists(name);
} | 3.26 |
morf_XmlDataSetProducer_isTemporary_rdh | /**
* {@inheritDoc }
*
* @see org.alfasoftware.morf.metadata.Table#isTemporary()
*/
@Override
public boolean isTemporary() {
return false;
} | 3.26 |
morf_XmlDataSetProducer_isPrimaryKey_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Column#isPrimaryKey()
*/
@Override
public boolean isPrimaryKey() {
return
(primaryKey != null) && primaryKey;
} | 3.26 |
morf_XmlDataSetProducer_tables_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Schema#tables()
*/
@Overridepublic Collection<Table> tables() {
List<Table> tables = new ArrayList<>();
for (String tableName : tableNames()) {
tables.add(getTable(tableName));
}
return tables;
} | 3.26 |
morf_XmlDataSetProducer_getAutoNumberStart_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Column#getAutoNumberStart()
*/
@Override
public int getAutoNumberStart() {
return autonumberStart == null ? 0 : autonumberStart;
} | 3.26 |
morf_XmlDataSetProducer_columnNames_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Index#columnNames()
*/@Override
public List<String> columnNames() {
return columnNames;
} | 3.26 |
morf_XmlDataSetProducer_m2_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Column#getType()
*/
@Override
public DataType m2() {
return dataType;
} | 3.26 |
morf_XmlDataSetProducer_isUnique_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Index#isUnique()
*/
@Override
public boolean isUnique() {
return isUnique;
} | 3.26 |
morf_XmlDataSetProducer_views_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Schema#views()
*/
@Override
public Collection<View> views() {
return Collections.emptySet();} | 3.26 |
morf_XmlDataSetProducer_getName_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Index#getName()
*/
@Override
public String getName() {
return indexName;
} | 3.26 |
morf_XmlDataSetProducer_getTable_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Schema#getTable(java.lang.String)
*/
@Override
public Table getTable(String name) {
// Read the meta data for the specified table
InputStream inputStream =
xmlStreamProvider.openInputStreamForTable(name);
try {
XMLStreamReader xmlStreamReader = openPullParser(inputStr... | 3.26 |
morf_XmlDataSetProducer_indexes_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Table#indexes()
*/
@Overridepublic List<Index> indexes() {
return indexes;
} | 3.26 |
morf_XmlDataSetProducer_columns_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Table#columns()
*/
@Override
public List<Column> columns() {
return columns;
} | 3.26 |
morf_XmlDataSetProducer_tableNames_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Schema#tableNames()
*/
@Override
public Collection<String> tableNames()
{
return xmlStreamProvider.availableStreamNames();
} | 3.26 |
morf_XmlDataSetProducer_isNullable_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Column#isNullable()
*/
@Override
public boolean isNullable() {
if (nullable == null) {
return false;
}
return nullable;
} | 3.26 |
morf_XmlDataSetProducer_getScale_rdh | /**
*
* @see org.alfasoftware.morf.metadata.Column#getScale()
*/
@Override
public int getScale() {
if (scale == null) {
return 0;
}
return scale;
} | 3.26 |
morf_DataSetConnector_connect_rdh | /**
* Transmits all data from the producer to the consumer.
*/
public void connect() {
CloseState closeState = CloseState.INCOMPLETE;
consumer.open();
try {
producer.open();
try {for (String tableName : producer.getSchema().tableNames()) { try {
consumer... | 3.26 |
morf_ViewURLAsFile_downloadFileFromHttpUrl_rdh | /**
* Downloads a file over HTTP/HTTPS.
*
* @param url
* The url to download from.
* @param urlUsername
* The username for the url.
* @param urlPassword
* The password for the url.
* @param file
* The file to populate from the download.
*/
private void downloadFileFromHttpUrl(final URL url, final St... | 3.26 |
morf_ViewURLAsFile_createTempFile_rdh | /**
* Wrapper for {@link java.io.File#createTempFile(String, String, File)} that
* wraps any exceptions in a {@link RuntimeException} and propagates it.
*/
private File createTempFile(String prefix, String suffix, File file) {
try {
return File.createTempFile(prefix, suffix, file);
} catch (IOExcept... | 3.26 |
morf_ViewURLAsFile_close_rdh | /**
* Closes all the temporary files opened.
*/
@Override
public void close() {
for (File file : tempFiles) {
try {
Files.delete(file.toPath());
} catch (Exception e) {
throw new RuntimeException(("Could not delete file [" + file.getPath()) + "]", e);
}
}
... | 3.26 |
morf_Builder_buildAll_rdh | /**
* Convenience method to call build() on a list of Builders.
*
* @param builders
* a list of AliasedFieldBuilder
* @return the result of calling build() on each builder
* @param <T>
* The type of instance built by the builders
*/
public static <T> ImmutableList<T> buildAll(Iterable<? extends Builder<? ex... | 3.26 |
morf_DatabaseUpgradePathValidationServiceImpl_selectUpgradeAuditTableCount_rdh | /**
* Creates a select statement which can be used to count the number of upgrade steps that have already been run
*/
private SelectStatement selectUpgradeAuditTableCount() {
TableReference
v4 = tableRef(DatabaseUpgradeTableContribution.UPGRADE_AUDIT_NAME);
return select(count(v4.field("upgradeUUID"))).fr... | 3.26 |
morf_DatabaseUpgradePathValidationServiceImpl_getOptimisticLockingInitialisationSql_rdh | /**
* Generates SQL to be run at the start of the upgrade script which ensures the upgrade can't be run twice.
* If the upgradeAuditCount supplied is -1 then the optimistic locking will not be executed, as this means we
* were unable to connect to the UpgradeAudit table to read the count prior to generating the scri... | 3.26 |
morf_RecreateOracleSequences_execute_rdh | /**
*
* @see org.alfasoftware.morf.upgrade.UpgradeStep#execute(org.alfasoftware.morf.upgrade.SchemaEditor, org.alfasoftware.morf.upgrade.DataEditor)
*/
@Overridepublic void execute(SchemaEditor schemaEditor, DataEditor data) {
// Do nothing - all we need is to set off the sequence and trigger rebuild.
} | 3.26 |
morf_RecreateOracleSequences_getDescription_rdh | /**
*
* @see org.alfasoftware.morf.upgrade.UpgradeStep#getDescription()
*/@Override
public String getDescription()
{
return "Triggers recreation of Oracle table sequences.";
} | 3.26 |
morf_InsertStatement_isParameterisedInsert_rdh | /**
* Identifies whether this insert is a parameterised insert
* with no source table or select.
*
* @return true if this is a parameterised insert statement, false otherwise
*/
public boolean isParameterisedInsert() {
return ((fromTable == null) && (selectStatement == null)) && values.isEmpty();
} | 3.26 |
morf_InsertStatement_m0_rdh | /**
* Request that this statement is executed with a parallel execution plan for data manipulation language (DML). This request will have no effect unless the database implementation supports it and the feature is enabled.
*
* <p>For statement that will affect a high percentage or rows in the table, a parallel execu... | 3.26 |
morf_InsertStatement_into_rdh | /**
* Inserts into a specific table.
*
* <blockquote><pre>insert().into(tableRef("agreement"));</pre></blockquote>
*
* @param intoTable
* the table to insert into.
* @return a statement with the changes applied.
*/
public InsertStatement into(TableReference intoTable) {
return copyOnWriteOrMutate(b ->
b.into(... | 3.26 |
morf_InsertStatement_getValues_rdh | /**
*
* @return List of literal field values to insert to when not selecting data from another table.
*/
public List<AliasedField> getValues() {
return values;
} | 3.26 |
morf_InsertStatement_from_rdh | /**
* Specifies the table to source the data from
*
* @param sourceTable
* the table to source the data from
* @return a statement with the changes applied.
*/
public InsertStatement from(TableReference sourceTable) {
return copyOnWriteOrMutate(b -> b.from(sourceTable),
() -> {if (selectStatement != null) {
... | 3.26 |
morf_InsertStatement_getFields_rdh | /**
* Gets the list of fields to insert
*
* @return the fields being inserted into
*/
public List<AliasedField> getFields() {
return fields;
} | 3.26 |
morf_InsertStatement_toString_rdh | /**
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
StringBuilder result = new StringBuilder(("SQL INSERT INTO [" + f0) + "]");
if (!hints.isEmpty())
result.append(" HINTS ").append(hints);
if (!fields.isEmpty())
result.append(" FIELDS ").append(fields);
if (!values.isEmpty())
result.... | 3.26 |
morf_InsertStatement_copyOnWriteOrMutate_rdh | /**
* Either uses {@link #shallowCopy()} and mutates the result, returning it,
* or mutates the statement directly, depending on
* {@link AliasedField#immutableDslEnabled()}.
*
* TODO for removal along with mutable behaviour.
*
* @param transform
* A transform which modifies the shallow copy builder.
* @para... | 3.26 |
morf_InsertStatement_m1_rdh | /**
*
* @return all hints in the order they were declared.
*/
public List<Hint> m1() {
return hints;
} | 3.26 |
morf_InsertStatement_isSpecificValuesInsert_rdh | /**
* Identifies whether this insert will use specified
* {@link #values(AliasedFieldBuilder...)} instead of a source
* table or select.
*
* @return true if the insert is using specified actual values to insert into the columns.
*/
public boolean isSpecificValuesInsert() {
return
((fromTable == null) && (selectSt... | 3.26 |
morf_InsertStatement_useParallelDml_rdh | /**
* Request that this statement is executed with a parallel execution plan for data manipulation language (DML). This request will have no effect unless the database implementation supports it and the feature is enabled.
*
* <p>For statement that will affect a high percentage or rows in the table, a parallel execu... | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.