name stringlengths 12 178 | code_snippet stringlengths 8 36.5k | score float64 3.26 3.68 |
|---|---|---|
morf_AbstractDatabaseType_split_rdh | /**
* Splits a string using the pattern specified, keeping the delimiters in between.
*
* @param text
* the text to split.
* @param delimiterPattern
* the regex pattern to use as the delimiter.
* @return a list of strings made up of the parts and their delimiters.
*/
private Stack<String> split(String text... | 3.26 |
morf_AbstractDatabaseType_identifier_rdh | /**
*
* @see org.alfasoftware.morf.jdbc.DatabaseType#identifier()
*/
@Override
public final String identifier() {
return identifier;
} | 3.26 |
morf_AbstractDatabaseType_splitJdbcUrl_rdh | /**
* Splits up a JDBC URL into its components and returns the result
* as a stack, allowing it to be parsed from left to right.
*
* @param jdbcUrl
* The JDBC URL.
* @return The split result as a stack.
*/
protected final Stack<String> splitJdbcUrl(String jdbcUrl) {
Stack<String> splitURL = split(jdbcUrl.t... | 3.26 |
morf_AbstractDatabaseType_extractPath_rdh | /**
* Extracts the path part of the URL from the stack returned by
* {@link #splitJdbcUrl(String)}. Assumes that the stack has already
* had the preceding components (e.g. protocol, host and port) popped.
*
* @param splitURL
* A stack containing the remaining portions of a JDBC URL.
* @return The path.
*/
pr... | 3.26 |
morf_AbstractDatabaseType_canTrace_rdh | /**
*
* @return true if tracing can be enabled on the database type
*/
@Override
public boolean canTrace() {
return false;
} | 3.26 |
morf_SqlDateUtils_castAsDateNullIfZero_rdh | /**
* Returns null if the supplied expression is zero, otherwise returns the expression casted to a date.
*
* @param expression
* the expression to evaluate
* @return null or cast expression as a date
*/ public static AliasedField castAsDateNullIfZero(AliasedField expression) {
return castAsDate(nullLiteral... | 3.26 |
morf_SqlDateUtils_castAsDateReplaceValueIfZero_rdh | /**
* Returns the replacement value if the evaluating expression is zero,
* otherwise returns the value casted as date.
*
* @param expression
* the expression to evaluate
* @param replace
* the replacement value
* @return expression or replacement value casted as date
*/
public static AliasedField castAsDa... | 3.26 |
morf_SqlDateUtils_castAsDateReplaceValueIfNullOrZero_rdh | /**
* Returns the replacement value if the evaluating expression is null or zero,
* otherwise returns the value casted as date.
*
* @param expression
* the expression to evaluate
* @param replace
* the replacement value
* @return expression or replacement value casted as date
*/
public static AliasedField ... | 3.26 |
morf_SqlDateUtils_castAsDateCaseStatement_rdh | /**
* Return the replacement value(casted as date) if the criterion is true,
* otherwise returns the value casted as date.
*
* @param expression
* the field to be casted as DATE
* @param criterion
* the criterion to evaluate
* @param re... | 3.26 |
morf_SqlDateUtils_castAsDate_rdh | /**
* Returns the field as a date.
*
* @param field
* the field to be casted as date
* @return the field as a date
*/
public static AliasedField castAsDate(AliasedField field) {
return cast(field).asString(8).asDate();
} | 3.26 |
morf_UpgradeGraph_isPackageNameValid_rdh | // Determine if the package name version is valid
private boolean isPackageNameValid(Class<? extends UpgradeStep> stepClass) {
if (stepClass.getPackage() == null) {
return false;
}
return stepClass.getPackage().getName().matches(".*\\.upgrade\\.v[0-9]+_[0-9]+(_[0-9]+[a-z]?)*$");
} | 3.26 |
morf_UpgradeGraph_m0_rdh | /**
*
* @return total ordering of upgrade steps.
*/
public Collection<Class<? extends UpgradeStep>> m0() {
return Collections.unmodifiableCollection(orderedSteps.values());
} | 3.26 |
morf_UpgradeGraph_isVersionAnnotationValid_rdh | // Determine if the Version annotation value is valid
private boolean isVersionAnnotationValid(Class<? extends UpgradeStep> stepClass) {return stepClass.getAnnotation(Version.class).value().matches("[0-9]+\\.[0-9]+(\\.[0-9]+[a-z]?)*$");
} | 3.26 |
morf_MergeStatement_into_rdh | /**
* Merges into a specific table.
*
* <blockquote><pre>merge().into(tableRef("agreement"));</pre></blockquote>
*
* @param intoTable
* the table to merge into.
* @return a statement with the changes applied.
*/
public MergeStatement into(TableReference intoTable) {
if (AliasedField.immutableDslEnabled()... | 3.26 |
morf_MergeStatement_shallowCopy_rdh | /**
* Performs a shallow copy to a builder, allowing a duplicate
* to be created and modified.
*
* @return A builder, initialised as a duplicate of this statement.
*/
@Override
public MergeStatementBuilder shallowCopy() {
return new MergeStatementBuilder(this);
} | 3.26 |
morf_MergeStatement_drive_rdh | /**
*
* @see org.alfasoftware.morf.util.ObjectTreeTraverser.Driver#drive(ObjectTreeTraverser)
*/
@Override
public void drive(ObjectTreeTraverser traverser) {
traverser.dispatch(getTableUniqueKey()).dispatch(getIfUpdating()).dispatch(getTable()).dispatch(getSelectStatement());
} | 3.26 |
morf_MergeStatement_from_rdh | /**
* Specifies the select statement to use as a source of the data.
*
* @param statement
* the source statement.
* @return a statement with the changes applied.
*/
public MergeStatement from(SelectStatement statement) {
if (AliasedField.immutableDslEnabled()) {
return shallowCopy().from(statement).... | 3.26 |
morf_MergeStatement_toString_rdh | /**
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return ((((((("SQL MERGE INTO [" + table) + "] USING [") + selectStatement) + "] KEY [") + tableUniqueKey) + "] IF UPDATING [") + ifUpdating) + "]";
} | 3.26 |
morf_MergeStatement_getSelectStatement_rdh | /**
* Gets the select statement that selects the values to merge
* into the table.
*
* @return the select statement.
*/
public SelectStatement getSelectStatement() {
return selectStatement;
} | 3.26 |
morf_MergeStatement_getTableUniqueKey_rdh | /**
* Gets a list of the fields used as the key upon which to match.
*
* @return the table unique key.
*/
public List<AliasedField> getTableUniqueKey() {
return tableUniqueKey;
} | 3.26 |
morf_MergeStatement_merge_rdh | /**
* Constructs a Merge Statement which either inserts or updates
* a record into a table depending on whether a condition exists in
* the table.
*
* @return Statement builder.
*/
public static MergeStatementBuilder merge() {
return new MergeStatementBuilder();
} | 3.26 |
morf_MergeStatement_tableUniqueKey_rdh | /**
* <p>
* Specifies the fields which make up a unique index or primary key on the
* target table.
* </p>
* <p>
* These <em>must</em> fully match a unique index or primary key, otherwise
* this statement will fail on MySQL. Note also potential issues around having
* two unique indexes or a primary key and uni... | 3.26 |
morf_MergeStatement_getTable_rdh | /**
* Gets the table to merge the data into.
*
* @return the table.
*/
public TableReference getTable() {
return table;} | 3.26 |
morf_MergeStatement_deepCopy_rdh | /**
*
* @see org.alfasoftware.morf.util.DeepCopyableWithTransformation#deepCopy(org.alfasoftware.morf.util.DeepCopyTransformation)
*/
@Override
public MergeStatementBuilder deepCopy(DeepCopyTransformation transformer) {return new MergeStatementBuilder(this, transformer);
} | 3.26 |
morf_TempTransitionalBuilderWrapper_wrapper_rdh | /**
* Temporary builder wrapper. This is to ensure other methods can return builders rather than instances, until
*
* @param instance
* the instance to wrap.
* @return a builder that wraps the given instance.
* @param <T>
* the type of the instance being wrapped
*/
public static <T> Builder<T> wrapper(final... | 3.26 |
morf_DrawIOGraphPrinter_equals_rdh | /**
* Based on label only.
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() != obj.getClass())
return false;
BasicNode other = ((BasicNode) (obj));
... | 3.26 |
morf_DrawIOGraphPrinter_generateColourForModule_rdh | /**
*
* @param input
* @return colour based on given input
*/static Colour generateColourForModule(String input) {int i = input.hashCode();
int r = (i >> 16) & 0xff;
int g = (i >> 8) & 0xff;
int b = i & 0xff;
Colour colour = new Colour();
colour.hex = (("#" + String.format("%02X", r)) + Strin... | 3.26 |
morf_DrawIOGraphPrinter_hashCode_rdh | /**
* Based on label only.
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result) + (label == null ? 0 : label.hashCode());
return result;
} | 3.26 |
morf_DrawIOGraphPrinter_print_rdh | /**
* Prints the given graph to String instance in a format suitable for importing into Draw.io, using the
* default layout (HORIZONTAL_TREE).
*
* @param graph
* - {@link MutableGraph} of {@link Node}
*/
default String print(PrintableGraph<Node> graph) {
return print(graph, LayoutFormat.HORIZONTAL_TREE);
} | 3.26 |
morf_XmlDataSetConsumer_close_rdh | /**
* Fired when a dataset has ended.
*
* @see org.alfasoftware.morf.dataset.DataSetConsumer#close(org.alfasoftware.morf.dataset.DataSetConsumer.CloseState)
*/
@Override
public void close(CloseState closeState) {
xmlStreamProvider.close();
} | 3.26 |
morf_XmlDataSetConsumer_getValue_rdh | /**
* Get the value of the column from the provided record. Can be overridden in subclasses if required.
*
* @param record
* the record to extract a value from
* @param column
* the column to extract a value from
* @param table
* the name of the table being processed
* @return the value of column from re... | 3.26 |
morf_XmlDataSetConsumer_emptyElement_rdh | /**
* Output an empty (self-closing) element: <foo/>
*
* @param contentHandler
* The content handler
* @param name
* The element name
* @param attributes
* The attributes
* @throws SAXException
* When there's a writer error
*/
private void emptyElement(ContentHandler contentHandler, String name, A... | 3.26 |
morf_XmlDataSetConsumer_buildIndexAttributes_rdh | /**
* Build the attributes for a database index
*
* @param index
* The index
* @return The attributes
*/
private Attributes buildIndexAttributes(Index index) {
AttributesImpl indexAttributes = new AttributesImpl();
indexAttributes.addAttribute(XmlDataSetNode.URI, XmlDataSetNode.NAME_ATTRIBUTE, XmlDataSetNode.NA... | 3.26 |
morf_XmlDataSetConsumer_open_rdh | /**
*
* @see org.alfasoftware.morf.dataset.DataSetConsumer#open()
*/
@Override
public void open() {
xmlStreamProvider.open();
if (clearDestinationBehaviour.equals(ClearDestinationBehaviour.CLEAR)) {
// we're outputting, so clear the destination of any previous runs
xmlStreamProvider.clearDest... | 3.26 |
morf_XmlDataSetConsumer_createContentHandler_rdh | /**
*
* @param outputStream
* The output
* @return A content handler
* @throws IOException
* When there's an XML error
*/
private ContentHandler createContentHandler(OutputStream outputStream) throws IOException {
Properties
outputProperties = OutputPropertiesFactory.getDefaultMethodProperties(Method.XML);ou... | 3.26 |
morf_XmlDataSetConsumer_buildColumnAttributes_rdh | /**
*
* @param column
* The column for which to build attributes
* @return The attributes
*/
private AttributesImpl buildColumnAttributes(Column column) {
AttributesImpl columnAttributes = new
AttributesImpl();
DataType columnDateType = column.getType();
columnAttributes.addAttribute(XmlDataSetNode.URI, XmlDa... | 3.26 |
morf_XmlDataSetConsumer_outputTableMetaData_rdh | /**
* Serialise the meta data for a table.
*
* @param table
* The meta data to serialise.
* @param contentHandler
* Content handler to receive the meta data xml.
* @throws SAXException
* Propagates from SAX API calls.
*/
private void outputTableMetaData(Table table, ContentHandler contentHandler) throws ... | 3.26 |
morf_ExceptSetOperator_drive_rdh | /**
*
* @see org.alfasoftware.morf.util.ObjectTreeTraverser.Driver#drive(ObjectTreeTraverser)
*/
@Override
public void drive(ObjectTreeTraverser traverser) {
traverser.dispatch(getSelectStatement());
} | 3.26 |
morf_ExceptSetOperator_accept_rdh | /**
*
* @see org.alfasoftware.morf.sql.SchemaAndDataChangeVisitable#accept(org.alfasoftware.morf.upgrade.SchemaAndDataChangeVisitor)
*/
@Override
public void accept(SchemaAndDataChangeVisitor visitor) {
visitor.visit(this);
selectStatement.accept(visitor);
} | 3.26 |
morf_ExceptSetOperator_getSelectStatement_rdh | /**
* {@inheritDoc }
*
* @see org.alfasoftware.morf.sql.SetOperator#getSelectStatement()
*/
@Override
public SelectStatement getSelectStatement() {
return selectStatement;
} | 3.26 |
morf_ExceptSetOperator_toString_rdh | /**
*
* @see java.lang.Object#toString()
*/
@Override
public String toString() {
return "EXCEPT " + selectStatement;
} | 3.26 |
morf_ExceptSetOperator_hashCode_rdh | /**
*
* @see java.lang.Object#hashCode()
*/
@Override
public int hashCode() {
final int prime = 31;
int result = 1;
result = (prime * result) + (selectStatement == null ? 0 : selectStatement.hashCode());
return result;
} | 3.26 |
morf_ExceptSetOperator_equals_rdh | /**
*
* @see java.lang.Object#equals(java.lang.Object)
*/
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (getClass() !=
obj.getClass())
return false;
ExceptSetOperator other = ((ExceptSetOperator) (obj));... | 3.26 |
morf_ExceptSetOperator_deepCopy_rdh | /**
*
* @see org.alfasoftware.morf.util.DeepCopyableWithTransformation#deepCopy(org.alfasoftware.morf.util.DeepCopyTransformation)
*/
@Override
public Builder<SetOperator> deepCopy(DeepCopyTransformation transformer) {
return TempTransitionalBuilderWrapper.<SetOperator>wrapper(new ExceptSetOperator(transformer... | 3.26 |
morf_DatabaseDataSetConsumer_table_rdh | /**
*
* @see org.alfasoftware.morf.dataset.DataSetConsumer#table(org.alfasoftware.morf.metadata.Table, java.lang.Iterable)
*/
@Override
public void table(Table table, Iterable<Record> records) {
TableLoader.builder().withConnection(connection).withSqlScriptExecutor(sqlExecutor).withDialect(sqlDialect).explicitCo... | 3.26 |
morf_DatabaseDataSetConsumer_open_rdh | /**
*
* @see org.alfasoftware.morf.dataset.DataSetConsumer#open()
*/
@Override
public void open() { log.debug("Opening database connection");
try {
connection = dataSource.getConnection();
wasAutoCommit = connection.getAutoCommit();connection.setAutoCommit(false);
sqlDialect = connection... | 3.26 |
morf_DatabaseDataSetConsumer_getSqlExecutor_rdh | /**
*
* @return the sqlExecutor
*/
SqlScriptExecutor getSqlExecutor() {
return sqlExecutor;
} | 3.26 |
morf_DatabaseDataSetConsumer_close_rdh | /**
*
* @see org.alfasoftware.morf.dataset.DataSetConsumer#close(org.alfasoftware.morf.dataset.DataSetConsumer.CloseState)
*/
@Override
public void close(CloseState closeState) {
try {
try {
if (CloseState.COMPLETE.equals(closeState)) {
log.debug("Closing and committing");
... | 3.26 |
morf_SelectStatement_appendFields_rdh | /**
*
* @param selectFields
* Field references to select.
* @deprecated Do not use {@link SelectStatement} mutably. Create a new statement.
*/
@Deprecated
public final void appendFields(AliasedFieldBuilder... selectFields) {
addFields(selectFields);
} | 3.26 |
morf_SelectStatement_forUpdate_rdh | /**
* Tells the database to pessimistically lock the tables.
*
* @return a new select statement with the change applied.
*/
public SelectStatement forUpdate() {
return copyOnWriteOrMutate((SelectStatementBuilder b)
-> b... | 3.26 |
morf_SelectStatement_getGroupBys_rdh | /**
* Gets the grouped fields
*
* @return the group by fields
*/
public List<AliasedField> getGroupBys() {
return groupBys;
} | 3.26 |
morf_SelectStatement_isForUpdate_rdh | /**
*
* @return true if the statement should pessimistic lock the tables.
*/
public boolean isForUpdate() {
return forUpdate;
} | 3.26 |
morf_SelectStatement_having_rdh | /**
* Filters the grouped records by some criteria.
*
* <blockquote><pre>
* select()
* .from(tableRef("Foo"))
* .groupBy(field("age"))
* .having(min(field("age")).greaterThan(20));</pre></blockquote>
*
* @param criterion
* the criteria on which to filter the grouped records
* @return a new select sta... | 3.26 |
morf_SelectStatement_deepCopy_rdh | /**
*
* @see org.alfasoftware.morf.util.DeepCopyableWithTransformation#deepCopy(org.alfasoftware.morf.util.DeepCopyTransformation)
*/
@Override
public SelectStatementBuilder deepCopy(DeepCopyTransformation transformer) {
return new SelectStatementBuilder(this, transformer);
} | 3.26 |
morf_SelectStatement_asField_rdh | /**
*
* @see org.alfasoftware.morf.sql.AbstractSelectStatement#asField()
*/@Override
public AliasedField asField() {
return new FieldFromSelect(this);
} | 3.26 |
morf_SelectStatement_useImplicitJoinOrder_rdh | /**
* If supported by the dialect, hints to the database that joins should be applied in the order
* they are written in the SQL statement.
*
* <p>This is supported to greater or lesser extends on different SQL dialects. For instance,
* MySQL has no means to force ordering on anything except inner joins, but we d... | 3.26 |
morf_SelectStatement_union_rdh | /**
* Perform an UNION set operation with another {@code selectStatement},
* eliminating any duplicate rows.
*
* <p>It is possible to have more than one union statement by chaining union calls:</p>
* <blockquote><pre>
* SelectStatement stmtA = select(...).fr... | 3.26 |
morf_SelectStatement_getHaving_rdh | /**
* Gets the grouping filter
*
* @return the having fields
*/
public Criterion getHaving() {
return having;
} | 3.26 |
morf_SelectStatement_withDialectSpecificHint_rdh | /**
* Supplies a specified custom hint to the database for a query.
*
* @param databaseType
* a database type identifier. Eg: ORACLE, PGSQL, SQL_SERVER
* @param hintContents
* the hint contents themselves, without the delimiters. Eg: without /*+ and *"/ * for Oracle hints
* @return this, for method chaining.... | 3.26 |
morf_SelectStatement_toString_rdh | /**
*
* @see org.alfasoftware.morf.sql.AbstractSelectStatement#toString()
*/
@Override
public String toString() {
StringBuilder result = new StringBuilder("SQL SELECT ");
if (distinct) {
result.append("DISTINCT ");
}
if (!hints.isEmpty()) {
result.append("with hints: ");
resul... | 3.26 |
morf_SelectStatement_groupBy_rdh | /**
* Specifies that the records should be grouped by the specified fields.
*
* <blockquote><pre>
* select()
* .from(tableRef("Foo"))
* .groupBy(groupByFields);</pre></blockquote>
*
* @param fields
* the fields to group by
* @return a new select statement with the change applied.
*/
public SelectStatem... | 3.26 |
morf_SelectStatement_withCustomHint_rdh | /**
* Supplies a specified custom hint to the database for a query.
*
* @param customHint
* representation of a custom hint
* @return this, for method chaining.
* @deprecated Use {@link #withDialectSpecificHint(String, String)} instead. See why this is deprecated at {@link org.alfasoftware.morf.sql.CustomHint}
... | 3.26 |
morf_SelectStatement_select_rdh | /**
* Constructs a Select Statement which optionally selects on a subset of fields.
* If no fields are specified then this is equivalent of selecting all
* fields (i.e. {@code SELECT * FROM x}).
*
* @param fields
* an array of fields that should be selected
* @return Builder.
*/
public static SelectStatementB... | 3.26 |
morf_SelectStatement_isDistinct_rdh | /**
* Checks whether the select statement should return a distinct set of results
*
* @return true if the statement should return a distinct set of results
*/
public boolean isDistinct() {
return distinct;
} | 3.26 |
morf_SelectStatement_unionAll_rdh | /**
* Perform an UNION set operation with another {@code selectStatement},
* keeping all duplicate rows.
*
* @param selectStatement
* the other select statement to be united with the current select statement;
* @return a new select statement with the change applied.
* @see #union(SelectStatement)
*/
public Se... | 3.26 |
morf_SelectStatement_except_rdh | /**
* Perform a EXCEPT set operation with another {@code selectStatement},
* eliminating any rows from the top select statement which exist in the bottom
* select statement.
* <p>
* If an except operation is performed then all participating select statements
* require the same selected column list.
* </p>
*
* ... | 3.26 |
morf_SelectStatement_getHints_rdh | /**
*
* @return all hints in the order they were declared.
*/
public List<Hint> getHints() {
return hints;
} | 3.26 |
morf_SelectStatement_getSetOperators_rdh | /**
*
* @return the list of set operators to be applied on this select statement.
*/
public List<SetOperator> getSetOperators() {
return setOperators;
} | 3.26 |
morf_SelectStatement_withParallelQueryPlan_rdh | /**
* Request that this query is executed with a parallel execution plan and with the given degree of parallelism. If the database implementation does not support, or is configured to disable parallel query execution, then this request will have no effect.
*
* <p>For queries that are likely to conduct a full table s... | 3.26 |
morf_SelectStatement_drive_rdh | /**
*
* @see org.alfasoftware.morf.util.ObjectTreeTraverser.Driver#drive(ObjectTreeTraverser)
*/
@Override
public void drive(ObjectTreeTraverser traverser) {
super.drive(traverser);
traverser.dispatch(groupBys).dispatch(having).dispatch(setOperators).dispatch(hints);
} | 3.26 |
morf_SelectStatement_useIndex_rdh | /**
* If supported by the dialect, hints to the database that a particular index should be used
* in the query, but places no obligation on the database to do so.
*
* <p>In general, as with all query plan modification, <strong>do not use this unless you know
* exactly what you are doing</strong>.</p>
*
* <p>As f... | 3.26 |
morf_GraphBasedUpgrade_getRoot_rdh | /**
*
* @return no-op upgrade node which is the root of the graph
*/
public GraphBasedUpgradeNode getRoot() {
return root;
} | 3.26 |
morf_GraphBasedUpgrade_getPreUpgradeStatements_rdh | /**
*
* @return statements which must be executed before the upgrade
*/
public List<String> getPreUpgradeStatements() {
return preUpgradeStatements;
} | 3.26 |
morf_GraphBasedUpgrade_getNumberOfNodes_rdh | /**
*
* @return number of upgrade nodes in this graph, without the no-op root
*/
public int getNumberOfNodes() {
return numberOfNodes;
} | 3.26 |
morf_RecordHelper_copy_rdh | /**
* Creates a copy of a {@link Record}. Since {@link Record} does not guarantee immutability, use
* this for safety when holding onto records.
*
* @param record
* The record to copy.
* @param columns
* The columns in the record.
* @return The copy.
*/
public static Record copy(Record record, Iterable<C... | 3.26 |
morf_RecordHelper_javaTypeToRecordValue_rdh | /**
* Take a java value (int, long, boolean, {@link String}, {@link LocalDate}) and convert it into a string format
* suitable for inclusion in a {@link Record}.
*
* @param value
* The java value.
* @return The {@link Record} value string
*/
public static String javaTypeToRecordValue(Object value) {
if (value ... | 3.26 |
morf_RecordHelper_convertToComparableType_rdh | /**
* Convert a string record value to a type which is safe for comparisons.
*
* @param column
* The column source of the data
* @param stringValue
* The value
* @return A type-converted value.
* @deprecated Use {@link #convertToComparableType(Column, DataValueLookup)}
*/
@Deprecated
public static Comparab... | 3.26 |
morf_RecordHelper_recordValueToJavaType_rdh | /**
* Take a string value retrieved from a {@link Record} and convert it to a java value of the specified
* type.
*
* @param stringValue
* The value retrieved from a {@link Record}.
* @param type
* The Java class to use for the result.
* @param <T>
* The Java type corresponding to the supplied Class
* @... | 3.26 |
morf_RecordHelper_joinRecordValues_rdh | /**
* Joins the values of a record with a specified delimiter and direct string conversion.
* Where a null occurs, the <code>valueForNull</code> string will be used in the
* output.
*
* @param columns
* The columns from the record which should be joined.
* @param record
* the record to join
* @param delim... | 3.26 |
morf_SelectStatementBuilder_m0_rdh | /**
* Request that this query is executed with a parallel execution plan and with the given degree of parallelism. If the database implementation does not support, or is configured to disable parallel query execution, then this request will have no effect.
*
* <p>For queries that are likely to conduct a full table s... | 3.26 |
morf_SelectStatementBuilder_build_rdh | /**
* Builds the select statement.
*/
@Override
public SelectStatement build() {
return new SelectStatement(this); } | 3.26 |
morf_SelectStatementBuilder_withDialectSpecificHint_rdh | /**
* Supplies a specified custom hint and database type to the database for a query.
*
* @param databaseType
* a database type identifier. Eg: ORACLE, PGSQL, SQL_SERVER
* @param hintContents
* the hint contents themselves, without the delimiters. Eg: without /*+ and *"/ * for Oracle hints
* @return this, fo... | 3.26 |
morf_SelectStatementBuilder_withCustomHint_rdh | /**
* Supplies a specified custom hint to the database for a query.
*
* @param customHint
* representation of a custom hint
* @return this, for method chaining.
* @deprecated See {@link org.alfasoftware.morf.sql.CustomHint}
*/
@Deprecated
public SelectStatementBuilder withCustomHint(CustomHint customHint) {
th... | 3.26 |
morf_SelectStatementBuilder_except_rdh | /**
* Perform an EXCEPT set operation with another {@code selectStatement}, retaining
* all rows which exist in top select statement only.
*
* @param selectStatement
* the other select statement that contains entries that
* will not be present in the final result set.
* @return this, for method chaining.
*/... | 3.26 |
morf_SelectStatementBuilder_notDistinct_rdh | /**
* Disable DISTINCT. Although this is the default, it can be used
* to remove the DISTINCT behaviour on a copied statement.
* `
*
* @return this, for method chaining.
*/
public SelectStatementBuilder notDistinct() {
this.distinct = false;
return this;
} | 3.26 |
morf_SelectStatementBuilder_union_rdh | /**
* Perform an UNION set operation with another {@code selectStatement},
* eliminating any duplicate rows.
*
* <p>It is possible to have more than one union statement by chaining union calls:</p>
* <blockquote><pre>
* SelectStatement stmtA = select(...).from(...);
* SelectStatement stmtB = select(...).from(...... | 3.26 |
morf_SelectStatementBuilder_groupBy_rdh | /**
* Specifies that the records should be grouped by the specified fields.
*
* <blockquote><pre>
* select()
* .from(tableRef("Foo"))
* .groupBy(field("age"));</pre></blockquote>
*
* @param fields
* the fields to group by
* @return this, for method chaining.
*/
public SelectStatementBuilder groupBy(Ite... | 3.26 |
morf_SelectStatementBuilder_getGroupBys_rdh | /**
* Gets the grouped fields
*
* @return the group by fields
*/
List<AliasedField> getGroupBys() {
return groupBys;
} | 3.26 |
morf_SelectStatementBuilder_useImplicitJoinOrder_rdh | /**
* If supported by the dialect, hints to the database that joins should be applied in the order
* they are written in the SQL statement.
*
* <p>This is supported to greater or lesser extends on different SQL dialects. For instance,
* MySQL has no means to force ordering on anything except inner joins, but we d... | 3.26 |
morf_SelectStatementBuilder_distinct_rdh | /**
* Use DISTINCT.
*
* @return this, for method chaining.
*/
public SelectStatementBuilder distinct() {
this.distinct = true;
return this;
} | 3.26 |
morf_SelectStatementBuilder_useIndex_rdh | /**
* If supported by the dialect, hints to the database that a particular index should be used
* in the query, but places no obligation on the database to do so.
*
* <p>In general, as with all query plan modification, <strong>do not use this unless you know
* exactly what you are doing</strong>.</p>
*
* <p>As f... | 3.26 |
morf_SelectStatementBuilder_withParallelQueryPlan_rdh | /**
* Request that this query is executed with a parallel execution plan. If the database implementation does not support, or is configured to disable parallel query execution, then this request will have no effect.
*
* <p>For queries that are likely to conduct a full table scan, a parallel execution plan may result... | 3.26 |
morf_SelectStatementBuilder_optimiseForRowCount_rdh | /**
* If supported by the dialect, requests that the database arranges the query plan such that the
* first <code>rowCount</code> rows are returned as fast as possible, even if the statistics
* indicate that this means the full result set will take longer to be returned.
*
* <p>Note that this is <em>not</em> to be... | 3.26 |
morf_SelectStatementBuilder_getHints_rdh | /**
*
* @return all hints in the order they were declared.
*/
List<Hint> getHints() { return hints;
} | 3.26 |
morf_SelectStatementBuilder_unionAll_rdh | /**
* Perform an UNION set operation with another {@code selectStatement},
* keeping all duplicate rows.
*
* @param selectStatement
* the other select statement to be united with the current select statement;
* @return this, for method chaining.
* @see #union(SelectStatement)
*/
public SelectStatementBuilder
... | 3.26 |
morf_SelectStatementBuilder_forUpdate_rdh | /**
* Tells the database to pessimistically lock the tables.
*
* @return this, for method chaining.
*/
public SelectStatementBuilder forUpdate() {
this.f0 = true;
return this;} | 3.26 |
morf_SelectStatementBuilder_getSetOperators_rdh | /**
*
* @return the list of set operators to be applied on this select statement.
*/
List<SetOperator> getSetOperators() {
return setOperators;
} | 3.26 |
morf_SelectStatementBuilder_notForUpdate_rdh | /**
* Disables pessimistic locking.
*
* @return this, for method chaining.
*/
public SelectStatementBuilder notForUpdate() {
this.f0 = false;
return this;
} | 3.26 |
morf_SelectStatementBuilder_having_rdh | /**
* Filters the grouped records by some criteria.
*
* <blockquote><pre>
* select()
* .from(tableRef("Foo"))
* .groupBy(field("age"))
* .having(min(field("age")).greaterThan(20));</pre></blockquote>
*
* @param criterion
* the criteria on which to filter the grouped records
* @return this, for method... | 3.26 |
morf_ChangeIndex_getToIndex_rdh | /**
* Gets the index after the change
*
* @return the index after the change
*/
public Index getToIndex() {
return toIndex;
} | 3.26 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.