Class MSSQLServerDBDefinition
- java.lang.Object
-
- nz.co.gregs.dbvolution.databases.definitions.DBDefinition
-
- nz.co.gregs.dbvolution.databases.definitions.MSSQLServerDBDefinition
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
MSSQLServer2012DBDefinition
public class MSSQLServerDBDefinition extends DBDefinition
Defines the features of the Microsoft SQL Server database that differ from the standard database.This DBDefinition is automatically included in
MSSQLServerDBinstances, and you should not need to use it directly.- Author:
- Gregory Graham
- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class nz.co.gregs.dbvolution.databases.definitions.DBDefinition
DBDefinition.GroupByClauseMethod
-
-
Field Summary
Fields Modifier and Type Field Description static longserialVersionUID-
Fields inherited from class nz.co.gregs.dbvolution.databases.definitions.DBDefinition
DECIMAL_FORMAT_WITH_NANO_PRECISION, INTERVAL_SINGLEUNIT_UNIT, INTERVAL_SINGLEUNIT_VALUE
-
-
Constructor Summary
Constructors Constructor Description MSSQLServerDBDefinition()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringbeginStringValue()Returns the standard beginning of a string value in the database.StringbeginWithClause()The beginning of the WITH variant supported by this database.StringdoBooleanToIntegerTransform(String booleanExpression)Transforms a bit expression into an integer expression.StringdoColumnTransformForSelect(QueryableDatatype<?> qdt, String selectableName)Perform necessary transformations on the stored value to make it readable by Java.StringdoConcatTransform(String firstString, String secondString)Wraps the provided SQL snippets in a statement that joins the two snippets into one SQL snippet.StringdoConcatTransform(String firstString, String secondString, String... rest)Wraps the provided SQL snippets in a statement that joins the two snippets into one SQL snippet.StringdoCurrentUTCDateTimeTransform()StringdoDateAddDaysTransform(String dateValue, String numberOfDays)Does the required transformation to produce an SQL snippet that adds numberOfdays days to the dateValue.StringdoDateAddHoursTransform(String dateValue, String numberOfHours)Does the required transformation to produce an SQL snippet that adds numberOfHours hours to the dateValue.StringdoDateAddMinutesTransform(String dateValue, String numberOfMinutes)Does the required transformation to produce an SQL snippet that adds numberOfMinutes minutes to the dateValue.StringdoDateAddMonthsTransform(String dateValue, String numberOfMonths)Does the required transformation to produce an SQL snippet that adds numberOfMonths months to the dateValue.StringdoDateAddSecondsTransform(String dateValue, String numberOfSeconds)Does the required transformation to produce an SQL snippet that adds numberOfSeconds seconds to the dateValue.StringdoDateAddWeeksTransform(String dateValue, String numberOfWeeks)Does the required transformation to produce an SQL snippet that adds numberOfWeeks weeks to the dateValue.StringdoDateAddYearsTransform(String dateValue, String numberOfYears)Does the required transformation to produce an SQL snippet that adds numberOfYears years to the dateValue.StringdoDayDifferenceTransform(String dateValue, String otherDateValue)Convert the 2 SQL date values into a difference in days.StringdoDayOfWeekTransform(String dateSQL)Extracts the weekday from the date provided as a number from 1 to 7.StringdoDayTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the day part of the date.StringdoFindIntegerInStringTransform(String toSQLString)StringdoFindNumberInStringTransform(String toSQLString)StringdoHourDifferenceTransform(String dateValue, String otherDateValue)Convert the 2 SQL date values into a difference in hours.StringdoHourTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the hour part of the date.StringdoInstantAddDaysTransform(String dateValue, String numberOfDays)Does the required transformation to produce an SQL snippet that adds numberOfdays days to the dateValue.StringdoInstantAddHoursTransform(String dateValue, String numberOfHours)Does the required transformation to produce an SQL snippet that adds numberOfHours hours to the dateValue.StringdoInstantAddMinutesTransform(String dateValue, String numberOfMinutes)Does the required transformation to produce an SQL snippet that adds numberOfMinutes minutes to the dateValue.StringdoInstantAddMonthsTransform(String dateValue, String numberOfMonths)Does the required transformation to produce an SQL snippet that adds numberOfMonths months to the dateValue.StringdoInstantAddSecondsTransform(String dateValue, String numberOfSeconds)Does the required transformation to produce an SQL snippet that adds numberOfSeconds seconds to the dateValue.StringdoInstantAddWeeksTransform(String dateValue, String numberOfWeeks)Does the required transformation to produce an SQL snippet that adds numberOfWeeks weeks to the dateValue.StringdoInstantAddYearsTransform(String dateValue, String numberOfYears)Does the required transformation to produce an SQL snippet that adds numberOfYears years to the dateValue.StringdoInstantDayOfWeekTransform(String dateSQL)Extracts the weekday from the date provided as a number from 1 to 7.StringdoInstantDayTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the day part of the date.StringdoInstantHourTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the hour part of the date.StringdoInstantMinuteTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the minute part of the date.StringdoInstantMonthTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the month part of the date.StringdoInstantSecondTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the second part of the date.StringdoInstantSubsecondTransform(String dateExpression)Returns the partial second value from the date.StringdoInstantYearTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the year part of the date.protected StringdoIntegerToStringTransformUnsafe(String numberExpression)Transforms a SQL snippet of a integer expression into a character expression for this database.StringdoLine2DAllIntersectionPointsWithLine2DTransform(String firstGeometry, String secondGeometry)Generate the SQL required to find the complete set of all points of intersection between the tow 2 lines.StringdoLine2DAsTextTransform(String line2DSQL)Provide the SQL to derive the WKT version of the Line2D.StringdoLine2DEqualsTransform(String toSQLString, String toSQLString0)Transform the 2 Line2D SQL snippets into an EQUALS comparison of the 2StringdoLine2DGetBoundingBoxTransform(String toSQLString)Create the SQL to derive the bounding box of this Line2D SQLStringdoLine2DGetMaxXTransform(String toSQLString)Generate the SQL that will return the largest X value within the Line2D expression.StringdoLine2DGetMaxYTransform(String toSQLString)Generate the SQL that will return the largest Y value within the Line2D expression.StringdoLine2DGetMinXTransform(String toSQLString)Generate the SQL that will return the smallest X value within the Line2D expression.StringdoLine2DGetMinYTransform(String toSQLString)Generate the SQL that will return the smallest Y value within the Line2D expression.StringdoLine2DIntersectionPointWithLine2DTransform(String firstLine, String secondLine)Generate the SQL required to find the intersection point of the 2 line segment SQL expressions.StringdoLine2DIntersectsLine2DTransform(String firstLine, String secondLine)Generates the SQL required to find whether the 2 lines cross at any point.StringdoLine2DMeasurableDimensionsTransform(String toSQLString)Create the SQL required to get the dimension of this Line2D SQL.StringdoLineSegment2DAsTextTransform(String toSQLString)Generate the SQL required to convert the line segment SQL expression into the WKT string format.StringdoLineSegment2DDimensionTransform(String toSQLString)Generate the SQL required to find the dimension of the line segment SQL expression.StringdoLineSegment2DEqualsTransform(String toSQLString, String toSQLString0)Generate the SQL required to find whether the 2 line segment SQL expressions are equal.StringdoLineSegment2DGetBoundingBoxTransform(String toSQLString)Generate the SQL required to the rectangular boundary that fully encloses the line segment SQL expression.StringdoLineSegment2DGetMaxXTransform(String toSQLString)Generate the SQL required to find the largest X value in the line segment SQL expression.StringdoLineSegment2DGetMaxYTransform(String toSQLString)Generate the SQL required to find the largest Y value in the line segment SQL expression.StringdoLineSegment2DGetMinXTransform(String toSQLString)Generate the SQL required to find the smallest X value in the line segment SQL expression.StringdoLineSegment2DGetMinYTransform(String toSQLString)Generate the SQL required to find the smallest Y value in the line segment SQL expression.StringdoLineSegment2DIntersectionPointWithLineSegment2DTransform(String firstLineSegment, String secondLineSegment)Generate the SQL required to find the intersection point of the 2 line segment SQL expressions.StringdoLineSegment2DIntersectsLineSegment2DTransform(String toSQLString, String toSQLString0)Generates the database specific SQL for testing whether the 2 line segment expressions ever cross.StringdoLineSegment2DNotEqualsTransform(String toSQLString, String toSQLString0)Generate the SQL required to find whether the 2 line segment SQL expressions are NOT equal.StringdoMinuteDifferenceTransform(String dateValue, String otherDateValue)Convert the 2 SQL date values into a difference in minutes.StringdoMinuteTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the minute part of the date.StringdoMonthDifferenceTransform(String dateValue, String otherDateValue)Convert the 2 SQL date values into a difference in months.StringdoMonthTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the month part of the date.StringdoMultiPoint2DAsTextTransform(String first)Provides the SQL the transform the MultiPoint2D value into a WKT value.StringdoMultiPoint2DEqualsTransform(String first, String second)Provide the SQL to compare 2 MultiPoint2Ds using the equivalent of EQUALS.StringdoMultiPoint2DGetBoundingBoxTransform(String first)Provides the SQL the derive the bounding box containing all the points in the MultiPoint2D value.StringdoMultiPoint2DGetMaxXTransform(String first)Provides the SQL that will derive the largest X value of all the points in the MultiPoint2D valueStringdoMultiPoint2DGetMaxYTransform(String first)Provides the SQL that will derive the largest Y value of all the points in the MultiPoint2D valueStringdoMultiPoint2DGetMinXTransform(String first)Provides the SQL that will derive the smallest X value of all the points in the MultiPoint2D valueStringdoMultiPoint2DGetMinYTransform(String first)Provides the SQL that will derive the smallest Y value of all the points in the MultiPoint2D valueStringdoMultiPoint2DGetNumberOfPointsTransform(String first)Provides the SQL the derive the number of points in the multipoint2d value.StringdoMultiPoint2DGetPointAtIndexTransform(String first, String index)Provide the SQL to get point at the supplied index within the MultiPoint2DStringdoMultiPoint2DMeasurableDimensionsTransform(String first)Provides the SQL the derive the dimension (2 basically) of the MultiPoint2D value.StringdoMultiPoint2DToLine2DTransform(String first)Provides the SQL the transform the MultiPoint2D value into aLine2DResultvalue.protected StringdoNumberToStringTransformUnsafe(String numberExpression)Transforms a SQL snippet of a number expression into a character expression for this database.StringdoPoint2DAsTextTransform(String point2DString)Provide the SQL to derive the WKT version of the Point2D.StringdoPoint2DEqualsTransform(String firstPoint, String secondPoint)Provide the SQL to compare 2 Point2DsStringdoPoint2DGetBoundingBoxTransform(String point2D)Provide the SQL to derive the Polygon2D representing the Bounding Box of the Point2D.StringdoPoint2DGetXTransform(String point2D)Provide the SQL to return the X coordinate of the Point2DStringdoPoint2DGetYTransform(String point2D)Provide the SQL to return the Y coordinate of the Point2DStringdoPoint2DMeasurableDimensionsTransform(String point2D)Provide the SQL to return the dimension of the Point2DStringdoPolygon2DAsTextTransform(String polygonSQL)Generates the SQL to convert the polygon to the standard text version of a polygon.StringdoPolygon2DContainsPoint2DTransform(String polygon2DSQL, String point2DSQL)Generates the SQL to determine whether the first (polygon) argument contains the second point argument.StringdoPolygon2DContainsPolygon2DTransform(String firstGeometry, String secondGeometry)Test whether the first polygon completely contains the second polygon.StringdoPolygon2DDoesNotIntersectTransform(String firstGeometry, String secondGeometry)Inverse ofdoPolygon2DIntersectsTransform(java.lang.String, java.lang.String), tests whether the 2 polygons are non-coincident.StringdoPolygon2DEqualsTransform(String firstGeometry, String secondGeometry)Compare 2 polygons with EQUALS.StringdoPolygon2DGetAreaTransform(String toSQLString)Retrieve the area of the polygon.StringdoPolygon2DGetBoundingBoxTransform(String toSQLString)Create a simple four sided bounding for the polygon.StringdoPolygon2DGetExteriorRingTransform(String polygon2DSQL)Defines the transformation require to transform an SQL Polygon2D into a linestring representing the exterior ring of the polygon.StringdoPolygon2DGetMaxXTransform(String polygon2DSQL)Generate the SQL that will return the largest X value within the Polygon2D expression.StringdoPolygon2DGetMaxYTransform(String polygon2DSQL)Generate the SQL that will return the largest X value within the Polygon2D expression.StringdoPolygon2DGetMinXTransform(String polygon2DSQL)Generate the SQL that will return the smallest X value within the Polygon2D expression.StringdoPolygon2DGetMinYTransform(String polygon2DSQL)Generate the SQL that will return the smallest Y value within the Polygon2D expression.StringdoPolygon2DIntersectionTransform(String firstGeometry, String secondGeometry)Creates a Polygon2D representing the intersection of the Polygon2Ds.StringdoPolygon2DIntersectsTransform(String firstGeometry, String secondGeometry)Test whether the 2 polygons intersect.StringdoPolygon2DMeasurableDimensionsTransform(String polygon2DSQL)Returns the dimension of the polygon.StringdoPolygon2DOverlapsTransform(String firstGeometry, String secondGeometry)Test whether the 2 polygons intersect but not contained or within.StringdoPolygon2DTouchesTransform(String firstGeometry, String secondGeometry)Tests whether the polygons touch.StringdoPolygon2DWithinTransform(String firstGeometry, String secondGeometry)Test whether the first polygon is completely within the second polygon.StringdoPositionInStringTransform(String originalString, String stringToFind)Transforms an SQL snippet into an SQL snippet that provides the index of the string to find.StringdoRandomNumberTransform()Returns the required code to generate a random number.StringdoRoundTransform(String toSQLString)Generate the SQL to apply rounding to the Number expressionsStringdoRoundWithDecimalPlacesTransform(String number, String decimalPlaces)Generate the SQL to apply rounding to the Number expressions with the specified number of decimal places.StringdoSecondAndSubsecondTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the second part of the date.StringdoSecondDifferenceTransform(String dateValue, String otherDateValue)Convert the 2 SQL date values into a difference in whole seconds.StringdoSecondTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the second part of the date.StringdoStringAccumulateTransform(String accumulateColumn, String separator, String referencedTable)StringdoStringAccumulateTransform(String accumulateColumn, String separator, String orderByColumnName, String referencedTable)StringdoStringEqualsTransform(String firstSQLExpression, String secondSQLExpression)SQLServer follows the standard, unlike anyone else, and pads the short string with spaces before comparing.StringdoStringLengthTransform(String enclosedValue)Wraps the provided SQL snippet in a statement that the length of the value of the snippet.StringdoStringToNumberTransform(String stringResultContainingANumber)Provide SQL to interpret the String value as a number.StringdoSubsecondTransform(String dateExpression)Returns the partial second value from the date.StringdoSubstringTransform(String originalString, String start, String length)Transforms the arguments into a SQL snippet that produces a substring of the originalString from the start for length characters.StringdoTrimFunction(String enclosedValue)Wraps the provided SQL snippet in a statement that performs trims all spaces from the left and right of the value of the snippet.StringdoTruncTransform(String realNumberExpression, String numberOfDecimalPlacesExpression)Transforms 2 SQL snippets that represent a real number and a integer into a real number with the decimal places reduced to the integer.StringdoWeekDifferenceTransform(String dateValue, String otherDateValue)Convert the 2 SQL date values into a difference in days.StringdoYearDifferenceTransform(String dateValue, String otherDateValue)Convert the 2 SQL date values into a difference in years.StringdoYearTransform(String dateExpression)Transforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the year part of the date.StringendSQLStatement()Returns the default ending of an SQL statement for this database.protected StringformatNameForDatabase(String sqlObjectName)Apply standard object name transformations required by the database.StringformatTableName(DBRow table)Formats the table name correctly for this database.StringgetAlterTableAddColumnSQL(DBRow existingTable, PropertyWrapper<?,?,?> columnPropertyWrapper)StringgetArctan2FunctionName()Provides the ARCTAN2 function name for this database.StringgetColumnAutoIncrementSuffix()Returns the suffix added to a column definition to support auto-incrementing a column.protected StringgetCurrentDateOnlyFunctionName()Defines the function used to get the current date (excluding time) from the database.protected StringgetCurrentDateTimeFunction()Defines the function used to get the current timestamp from the database.protected StringgetCurrentZonedDateTimeFunction()Defines the function used to get the current timestamp from the database.protected StringgetDatabaseDataTypeOfQueryableDatatype(QueryableDatatype<?> qdt)Supplied to allow the DBDefintion to override the standard QDT datatype.StringgetDateFormattedForQuery(Date date)Transforms the Date instance into a SQL snippet that can be used as a date in a query.StringgetDatePartsFormattedForQuery(String years, String months, String days, String hours, String minutes, String seconds, String subsecond, String timeZoneSign, String timeZoneHourOffset, String timeZoneMinuteOffSet)Transforms the specific parts of a date from their SQL snippets into a SQL snippet that can be used as a date in a query.StringgetDefaultOrderingClause()StringgetFalseValue()The value used for FALSE boolean values.StringgetIfNullFunctionName()Provides the function name of the COALESCE, IFNULL, or NVL function.Collection<? extends String>getInsertCleanUp(DBRow table)Collection<? extends String>getInsertPreparation(DBRow table)StringgetLimitRowsSubClauseAfterWhereClause(QueryState state, QueryOptions options)Provides an opportunity for the definition to insert a row limiting statement after the query for example MySQL/MariaDB use SELECT ...StringgetLogBase10FunctionName()Return the function name for the Logarithm Base10 function.StringgetNaturalLogFunctionName()Return the function name for the Natural Logarithm function.StringgetRoundUpFunctionName()Return the function name for the RoundUp function.StringgetStandardDeviationFunctionName()Provides the function of the function that provides the standard deviation of a selection.StringgetStringLengthFunctionName()Returns the function name of the function used to determine the number of characters in the value.StringgetTrueValue()The value used for TRUE boolean values.booleanisDuplicateColumnException(Exception exc)LargeObjectHandlerTypepreferredLargeObjectReader(DBLargeObject<?> lob)LargeObjectHandlerTypepreferredLargeObjectWriter(DBLargeObject<?> lob)booleanprefersDatesReadAsStrings()Indicates whether the database prefers date values to be read as Strings.booleanprefersLargeObjectsReadAsBase64CharacterStream(DBLargeObject<?> lob)Indicates whether the database requires LargeObjects to be encoded as Base64 CLOBS using the CharacterStream method to read the value.booleanprefersLargeObjectsSetAsBase64String(DBLargeObject<?> lob)Indicates that the database prefers Large Object values to be set using the setCharacterStream method.booleanrequiresClosedPolygons()booleanrequiresOnClauseForAllJoins()booleanrequiresReversingLineStringsFromDatabase()booleansupportsArraysNatively()Indicates if the database supports ARRAYs natively and the functionality has been implemented.booleansupportsComparingBooleanResults()Indicates whether the database supports statements that compares to boolean values using EQUALS, NOT EQUALS, etc.booleansupportsDateRepeatDatatypeFunctions()booleansupportsDegreesFunction()MSSQLserver only supports integer degrees, and that's not good enough.booleansupportsDurationNatively()protected booleansupportsGreatestOfNatively()MS SQLServer does not support the GREATESTOF operation natively.booleansupportsHyperbolicFunctionsNatively()Indicates that this database supports hyperbolic functions natively.protected booleansupportsLeastOfNatively()MS SQLServer does not support the LEASTOF operation natively.booleansupportsNullsOrderingStandard()booleansupportsPurelyFunctionalGroupByColumns()MS SQLServer does not support the grouping by columns that do not access table data.StringtransformCoordinateArrayToDatabasePolygon2DFormat(List<String> coordinateSQL)Override this method to provide the SQL that will create a database Polygon2D value from the list of presumed coordinates.StringtransformCoordinatesIntoDatabasePoint2DFormat(String xValue, String yValue)Provide the SQL that correctly represents these coordinates in this database.com.vividsolutions.jts.geom.LineStringtransformDatabaseLine2DValueToJTSLineString(String lineStringAsSQL)From the database's representation of a Lin2D create a JTS LineString.com.vividsolutions.jts.geom.LineSegmenttransformDatabaseLineSegment2DValueToJTSLineSegment(String lineSegmentAsSQL)Convert the String object returned by the database into a JTS LineSegment object.com.vividsolutions.jts.geom.MultiPointtransformDatabaseMultiPoint2DValueToJTSMultiPoint(String pointsAsString)Convert the database's string representation of a MultiPoint2D value into a MultiPoint..com.vividsolutions.jts.geom.PointtransformDatabasePoint2DValueToJTSPoint(String pointsAsString)From the database's representation of a Point2D create a JTS Point.StringtransformLineSegmentIntoDatabaseLineSegment2DFormat(com.vividsolutions.jts.geom.LineSegment lineSegment)Convert the JTS LineSegment object into a SQL expression that the database will accept as a line segment.StringtransformLineStringIntoDatabaseLine2DFormat(com.vividsolutions.jts.geom.LineString line)Provide the SQL that correctly represents this LineString in this database.StringtransformMultiPoint2DToDatabaseMultiPoint2DValue(com.vividsolutions.jts.geom.MultiPoint points)Provide the SQL that correctly represents this MultiPoint2D value in this database.StringtransformPoint2DArrayToDatabasePolygon2DFormat(List<String> pointSQL)Create the SQL to transform a Point2DArray SQL into a Polygon2DStringtransformPoint2DIntoDatabaseFormat(com.vividsolutions.jts.geom.Point point)Provide the SQL that correctly represents this Point2D in this database.StringtransformPolygonIntoDatabasePolygon2DFormat(com.vividsolutions.jts.geom.Polygon polygon2DInWKTFormat)Generate the SQL that will transform a WKT version of a Polygon2D into the database's version of a Polygon2D.DBExpressiontransformToGroupableType(DBExpression expression)DBExpressiontransformToSelectableType(DBExpression columnExpression)DBExpressiontransformToSortableType(DBExpression columnExpression)Transform a datatype not supported by the database into a type that the database does support.DBExpressiontransformToStorableType(DBExpression columnExpression)Transform a datatype not supported by the database into a type that the database does support.DBExpressiontransformToWhenableType(BooleanExpression test)-
Methods inherited from class nz.co.gregs.dbvolution.databases.definitions.DBDefinition
beginAndLine, beginConditionClauseLine, beginDeleteLine, beginFromClause, beginFullOuterJoin, beginGroupByClause, beginInnerJoin, beginInsertColumnList, beginInsertLine, beginJoinClauseLine, beginLeftOuterJoin, beginNumberValue, beginOnClause, beginOrderByClause, beginOrLine, beginRightOuterJoin, beginSelectStatement, beginSetClause, beginTableAlias, beginUpdateLine, beginValueClause, beginValueSeparatorClause, beginWhereClause, beginWhereClauseLine, beginWithClausePrimingQuery, beginWithClauseRecursiveQuery, canProduceNullStrings, convertNullToEmptyString, countStarClause, doBitsValueTransform, doBooleanArrayElementTransform, doBooleanArrayResultInterpretation, doBooleanArrayTransform, doBooleanStatementToBooleanComparisonValueTransform, doBooleanValueToBooleanComparisonValueTransform, doBooleanValueTransform, doChooseTransformation, doComparableInstantTransform, doCurrentDateOnlyTransform, doCurrentDateTimeTransform, doCurrentTimeTransform, doCurrentUTCTimeTransform, doDateAtTimeZoneTransform, doDateIfNullTransform, doDateMinusDateRepeatTransform, doDateMinusDurationTransform, doDateMinusToDateRepeatTransformation, doDatePlusDateRepeatTransform, doDatePlusDurationTransform, doDateRepeatEqualsTransform, doDateRepeatGetDaysTransform, doDateRepeatGetHoursTransform, doDateRepeatGetMinutesTransform, doDateRepeatGetMonthsTransform, doDateRepeatGetSecondsTransform, doDateRepeatGetYearsTransform, doDateRepeatGreaterThanEqualsTransform, doDateRepeatGreaterThanTransform, doDateRepeatLessThanEqualsTransform, doDateRepeatLessThanTransform, doDateRepeatNotEqualsTransform, doDateRepeatToStringTransform, doDegreesTransform, doDurationEqualsTransform, doDurationGreaterThanEqualsTransform, doDurationGreaterThanTransform, doDurationLessThanEqualsTransform, doDurationLessThanTransform, doEndOfMonthTransform, doFormatAsDateRepeatSeconds, doGreatestOfTransformation, doIfEmptyStringThenElse, doIfNullThenElse, doIfThenElseTransform, doInstantEndOfMonthTransform, doIntegerEqualsTransform, doIntegerIfNullTransform, doIntegerToBitTransform, doIntegerToNumberTransform, doIntegerToStringTransform, doInTransform, doIsEmptyStringTransform, doIsNullOrIsEmptyStringTransform, doIsNullTransform, doLeastOfTransformation, doLeftPadTransform, doLeftTrimTransform, doLine2DGetMagnitudeTransform, doLine2DHasMagnitudeTransform, doLine2DNotEqualsTransform, doLine2DSpatialDimensionsTransform, doLineSegment2DEndPointTransform, doLineSegment2DGetMagnitudeTransform, doLineSegment2DHasMagnitudeTransform, doLineSegment2DSpatialDimensionsTransform, doLineSegment2DStartPointTransform, doLogBase10IntegerTransform, doLogBase10NumberTransform, doLowercaseTransform, doModulusTransform, doMultiPoint2DGetMagnitudeTransform, doMultiPoint2DHasMagnitudeTransform, doMultiPoint2DNotEqualsTransform, doMultiPoint2DSpatialDimensionsTransform, doNewLocalDateFromYearMonthDayTransform, doNotInTransform, doNumberEqualsTransform, doNumberIfNullTransform, doNumberToIntegerTransform, doNumberToStringTransform, doPoint2DDistanceBetweenTransform, doPoint2DGetMagnitudeTransform, doPoint2DHasMagnitudeTransform, doPoint2DSpatialDimensionsTransform, doPolygon2DGetMagnitudeTransform, doPolygon2DHasMagnitudeTransform, doPolygon2DSpatialDimensionsTransform, doPolygon2DUnionTransform, doRadiansTransform, doRandomIntegerTransform, doReplaceTransform, doRightPadTransform, doRightTrimTransform, doSelectFromRecursiveTable, doStringAccumulateTransform, doStringIfNullTransform, doStringIfNullUseEmptyStringTransform, doStringLiteralWrapping, doSubstringAfterTransform, doSubstringBeforeTransform, doUppercaseTransform, doWrapQueryForPaging, dropTriggerBasedIdentitySQL, endDeleteLine, endInsertColumnList, endInsertLine, endMultilineComment, endNumberValue, endOnClause, endOrderByClause, endStringValue, endTableAlias, endValueClause, endWithClausePrimingQuery, endWithClauseRecursiveQuery, exceptionIsTableFound, exceptionIsTableNotFound, formatColumnName, formatColumnNameForDBQueryResultSet, formatExpressionAlias, formatForColumnAlias, formatPrimaryKeyForRetrievingGeneratedKeys, formatTableAlias, formatTableAliasAndColumnName, formatTableAliasAndColumnNameForSelectClause, formatTableAndColumnName, formatWithClauseTableDefinition, getAddColumnColumnSQL, getAlterTableAddForeignKeyStatement, getAlterTableDropForeignKeyStatement, getAverageFunctionName, getCheezBurger, getChooseFunctionName, getCountFunctionName, getCreateDatabase, getCreateTableColumnsEnd, getCreateTableColumnsNameAndTypeSeparator, getCreateTableColumnsSeparator, getCreateTableColumnsStart, getCreateTablePrimaryKeyClauseEnd, getCreateTablePrimaryKeyClauseMiddle, getCreateTablePrimaryKeyClauseStart, getCreateTableStart, getCurrentTimeFunction, getCurrentUserFunctionName, getDenseRankFunctionName, getDropDatabase, getDropTableIfExistsClause, getDropTableStart, getEmptyString, getEqualsComparator, getExpFunctionName, getFalseOperation, getFirstValueFunctionName, getForeignKeyClauseForCreateTable, getFromClause, getFromDualEquivalent, getGreatestOfFunctionName, getHavingClauseStart, getIndexClauseForCreateTable, getInstantFormattedForQuery, getInstantPartsFormattedForQuery, getLagFunctionName, getLastValueFunctionName, getLeadFunctionName, getLeastOfFunctionName, getLimitRowsSubClauseDuringSelectClause, getLocalDateFormattedForQuery, getLocalDatePartsFormattedForQuery, getLocalDateTimeFormattedForQuery, getLocalDateTimeOffsetHours, getLocalDateTimeOffsetMinutes, getLowercaseFunctionName, getMaxFunctionName, getMinFunctionName, getNegationFunctionName, getNextSequenceValueFunctionName, getNotEqualsComparator, getNthValueFunctionName, getNTilesFunctionName, getNull, getNullsAnyOrder, getNullsFirst, getNullsLast, getNumericPrecision, getNumericScale, getOracleCompatibleVersion, getOrderByAscending, getOrderByDescending, getOrderByDirectionClause, getOrderByDirectionClause, getParseDurationPartOffset, getPercentRankFunctionName, getPreparedVariableSymbol, getPrimaryKeySequenceName, getPrimaryKeyTriggerName, getQueryableDatatypeClassForSQLDatatype, getRankFunctionName, getRecursiveQueryDepthColumnName, getRetrieveLastInsertedRowSQL, getRightTrimFunctionName, getRowNumberFunctionName, getSchemaAndTableSeparator, getSequenceUpdateSQL, getSpatial2DIndexSQL, getSpecialAutoIncrementType, getSpecialPrimaryKeyTypeOfDBDatatype, getSQLToCheckTableExists, getSQLToDropAnyAssociatedDatabaseObjects, getSQLTypeAndModifiersOfDBDatatype, getStartingOrderByClauseSeparator, getStartingSelectSubClauseSeparator, getStartingSetSubClauseSeparator, getSubsequentGroupBySubClauseSeparator, getSubsequentOrderByClauseSeparator, getSubsequentSelectSubClauseSeparator, getSubsequentSetSubClauseSeparator, getSumFunctionName, getSystemTableExclusionPattern, getTableAlias, getTableAliasForObject, getTableExistsSQL, getTableStructureQuery, getTriggerBasedIdentitySQL, getTrueOperation, getTruncFunctionName, getUnionDistinctOperator, getUnionOperator, getUppercaseFunctionName, getUTCDateFormattedForQuery, getValuesClauseColumnSeparator, getValuesClauseValueSeparator, getWhereClauseBeginningCondition, getWhereClauseBeginningCondition, hasLocalDateTimeOffset, hasSpecialAutoIncrementType, hasSpecialPrimaryKeyTypeForDBDatatype, isColumnNamesCaseSensitive, isPrimaryKeyAlreadyExistsException, parseDateFromGetString, parseDateRepeatFromGetString, parseDurationFromGetString, parseInstantFromGetString, parseLocalDateFromGetString, parseLocalDateTimeFromGetString, persistentConnectionRequired, preferredGroupByClauseMethod, prefersIndexBasedOrderByClause, prefersInstantsReadAsStrings, prefersLargeObjectsReadAsBLOB, prefersLargeObjectsReadAsBytes, prefersLargeObjectsReadAsCLOB, prefersLargeObjectsSetAsBLOB, prefersLargeObjectsSetAsCharacterStream, prefersTrailingPrimaryKeyDefinition, prefersTriggerBasedIdentities, propertyWrapperConformsToAutoIncrementType, requiredToProduceEmptyStringsForNull, requiresAddingTimeZoneToCurrentLocalDateTime, requiresRecursiveTableAlias, requiresSequenceUpdateAfterManualInsert, requiresSortedSubselectForStringAggregate, requiresSpatial2DIndexes, safeString, sanityCheckDBTableField, setLocalDateTimeOffsetHours, setLocalDateTimeOffsetMinutes, startMultilineComment, supportsAlterTableAddConstraint, supportsArcSineFunction, supportsBulkInserts, supportsChooseNatively, supportsCotangentFunction, supportsDifferenceBetweenNullAndEmptyStringNatively, supportsDropTableIfExists, supportsDurationDatatypeFunctions, supportsExpFunction, supportsFullOuterJoin, supportsFullOuterJoinNatively, supportsGeneratedKeys, supportsLeftPadTransform, supportsModulusFunction, supportsPagingNatively, supportsRadiansFunction, supportsRecursiveQueriesNatively, supportsRetrievingLastInsertedRowViaSQL, supportsRightOuterJoinNatively, supportsRightPadTransform, supportsRowLimitsNatively, supportsStandardDeviationFunction, supportsStatementIsClosed, supportsTableCheckingViaMetaData, supportsTimeZones, supportsUnionDistinct, supportsWindowingFunctionsInTheHavingClause, supportsWindowingFunctionsInTheOrderByClause, supportsXOROperator, toLowerCase, transformDatabasePolygon2DToJTSPolygon, transformJavaDurationIntoDatabaseDuration, transformPeriodIntoDateRepeat, willCloseConnectionOnStatementCancel, wrapNameForDatabase
-
-
-
-
Field Detail
-
serialVersionUID
public static final long serialVersionUID
- See Also:
- Constant Field Values
-
-
Method Detail
-
getDateFormattedForQuery
public String getDateFormattedForQuery(Date date)
Description copied from class:DBDefinitionTransforms the Date instance into a SQL snippet that can be used as a date in a query.For instance the date might be transformed into a string like " DATETIME('2013-03-23 00:00:00') "
- Specified by:
getDateFormattedForQueryin classDBDefinition- Parameters:
date- date- Returns:
- the date formatted as a string that the database will correctly interpret as a date.
-
getDatePartsFormattedForQuery
public String getDatePartsFormattedForQuery(String years, String months, String days, String hours, String minutes, String seconds, String subsecond, String timeZoneSign, String timeZoneHourOffset, String timeZoneMinuteOffSet)
Description copied from class:DBDefinitionTransforms the specific parts of a date from their SQL snippets into a SQL snippet that can be used as a date in a query.For instance the date parts might be transformed into a string like " DATETIME('2013-03-23 00:00:00') "
- Specified by:
getDatePartsFormattedForQueryin classDBDefinition- Parameters:
years- the sql representing the years part of the datemonths- the sql representing the months (1-12) part of the datedays- the sql representing the days (0-31) part of the datehours- the sql representing the hours (0-24) part of the dateminutes- the sql representing the minutes (0-60) part of the dateseconds- the sql representing the seconds (0-59) part of the datesubsecond- the sql representing the subsecond (0.0-0.9999) part of the date, precision is based on the database's limitationstimeZoneSign- + or -timeZoneHourOffset- the sql representing the minutes (0-59) part of the date's time zonetimeZoneMinuteOffSet- the sql representing the hours (0-13) part of the date's time zone- Returns:
- the date formatted as a string that the database will be correctly interpret as a date.
-
doConcatTransform
public String doConcatTransform(String firstString, String secondString, String... rest)
Description copied from class:DBDefinitionWraps the provided SQL snippets in a statement that joins the two snippets into one SQL snippet.- Overrides:
doConcatTransformin classDBDefinition- Parameters:
firstString- firstStringsecondString- secondStringrest- the other strings to concatenate- Returns:
- SQL snippet
- See Also:
StringExpression.append(java.lang.String),StringExpression.append(java.lang.Number),StringExpression.append(nz.co.gregs.dbvolution.results.StringResult),StringExpression.append(nz.co.gregs.dbvolution.results.NumberResult)
-
getDatabaseDataTypeOfQueryableDatatype
protected String getDatabaseDataTypeOfQueryableDatatype(QueryableDatatype<?> qdt)
Description copied from class:DBDefinitionSupplied to allow the DBDefintion to override the standard QDT datatype.When the
- Overrides:
getDatabaseDataTypeOfQueryableDatatypein classDBDefinition- Parameters:
qdt- qdt- Returns:
- the databases type for the QDT as a string
-
doColumnTransformForSelect
public String doColumnTransformForSelect(QueryableDatatype<?> qdt, String selectableName)
Description copied from class:DBDefinitionPerform necessary transformations on the stored value to make it readable by Java.Primarily used on Spatial types, this method allows a data type unknown to JDBC to be transformed into the necessary type (usually a String) to be read by Java and DBvolution.
- Overrides:
doColumnTransformForSelectin classDBDefinition- Parameters:
qdt- the DBV value to be storedselectableName- the selectable value- Returns:
- SQL
-
prefersDatesReadAsStrings
public boolean prefersDatesReadAsStrings()
Description copied from class:DBDefinitionIndicates whether the database prefers date values to be read as Strings.Normally dates are read as dates but this method switches DBvolution to using a text mode.
- Overrides:
prefersDatesReadAsStringsin classDBDefinition- Returns:
- the default implementation returns false.
- See Also:
DBDefinition.parseDateFromGetString(java.lang.String)
-
formatTableName
public String formatTableName(DBRow table)
Description copied from class:DBDefinitionFormats the table name correctly for this database.Used wherever a table alias is inappropriate, for instance UPDATE statements.
- Overrides:
formatTableNamein classDBDefinition- Parameters:
table- table- Returns:
- a string of the table name formatted for this database definition
-
formatNameForDatabase
protected String formatNameForDatabase(String sqlObjectName)
Description copied from class:DBDefinitionApply standard object name transformations required by the database.This methods helps support database specific naming rules by allowing post-processing of the object names to conform to the rules.
- Overrides:
formatNameForDatabasein classDBDefinition- Parameters:
sqlObjectName- the Java object name to be transformed into a database object name.- Returns:
- the object name formatted for use with this database
-
endSQLStatement
public String endSQLStatement()
Description copied from class:DBDefinitionReturns the default ending of an SQL statement for this database.- Overrides:
endSQLStatementin classDBDefinition- Returns:
- ";" or equivalent.
-
beginStringValue
public String beginStringValue()
Description copied from class:DBDefinitionReturns the standard beginning of a string value in the database.The default method returns "'", that is a single quote.
- Overrides:
beginStringValuein classDBDefinition- Returns:
- the formatting required at the beginning of a string value.
-
getLimitRowsSubClauseAfterWhereClause
public String getLimitRowsSubClauseAfterWhereClause(QueryState state, QueryOptions options)
Description copied from class:DBDefinitionProvides an opportunity for the definition to insert a row limiting statement after the query for example MySQL/MariaDB use SELECT ... FROM ... WHERE ... LIMIT 10 ; Based on the example for MySQL/MariaDB this method should return " LIMIT 10 " If the database does not support row limiting this method should throw an exception when rowLimit is not null If the database does not limit rows after the where clause this method should return ""- Overrides:
getLimitRowsSubClauseAfterWhereClausein classDBDefinition- Parameters:
state- the current query stateoptions- options- Returns:
- the row limiting sub-clause or ""
-
doSubstringTransform
public String doSubstringTransform(String originalString, String start, String length)
Description copied from class:DBDefinitionTransforms the arguments into a SQL snippet that produces a substring of the originalString from the start for length characters.- Overrides:
doSubstringTransformin classDBDefinition- Parameters:
originalString- originalStringstart- startlength- length- Returns:
- an expression that will produce an appropriate substring of the originalString.
-
getStringLengthFunctionName
public String getStringLengthFunctionName()
Description copied from class:DBDefinitionReturns the function name of the function used to determine the number of characters in the value.DBvolution tries to ensure that the character length of a value is equal to the character length of an equivalent Java String.
That is to say: DBV.charlength() === java.lang.String.length()
- Overrides:
getStringLengthFunctionNamein classDBDefinition- Returns:
- "LOWER"
-
doStringEqualsTransform
public String doStringEqualsTransform(String firstSQLExpression, String secondSQLExpression)
SQLServer follows the standard, unlike anyone else, and pads the short string with spaces before comparing.This effectively means strings are trimmed during comparisons whether you like it or not.
While this seems useful, in fact it prevents checking for incorrect strings and breaks the industrial standard.
- Overrides:
doStringEqualsTransformin classDBDefinition- Parameters:
firstSQLExpression- the first string value to comparesecondSQLExpression- the second string value to compareSupport DBvolution at Patreon
- Returns:
- SQL
-
doTrimFunction
public String doTrimFunction(String enclosedValue)
Description copied from class:DBDefinitionWraps the provided SQL snippet in a statement that performs trims all spaces from the left and right of the value of the snippet.- Overrides:
doTrimFunctionin classDBDefinition- Parameters:
enclosedValue- enclosedValue- Returns:
- SQL snippet
-
doPositionInStringTransform
public String doPositionInStringTransform(String originalString, String stringToFind)
Description copied from class:DBDefinitionTransforms an SQL snippet into an SQL snippet that provides the index of the string to find.- Overrides:
doPositionInStringTransformin classDBDefinition- Parameters:
originalString- originalStringstringToFind- stringToFind- Returns:
- a SQL snippet that will produce the index of the find string.
-
doConcatTransform
public String doConcatTransform(String firstString, String secondString)
Description copied from class:DBDefinitionWraps the provided SQL snippets in a statement that joins the two snippets into one SQL snippet.- Overrides:
doConcatTransformin classDBDefinition- Parameters:
firstString- firstStringsecondString- secondString- Returns:
- SQL snippet
- See Also:
StringExpression.append(java.lang.String),StringExpression.append(java.lang.Number),StringExpression.append(nz.co.gregs.dbvolution.results.StringResult),StringExpression.append(nz.co.gregs.dbvolution.results.NumberResult)
-
getIfNullFunctionName
public String getIfNullFunctionName()
Description copied from class:DBDefinitionProvides the function name of the COALESCE, IFNULL, or NVL function.This provides the function name for this database that transforms a NULL into another value.
- Overrides:
getIfNullFunctionNamein classDBDefinition- Returns:
- "COALESCE"
-
supportsDegreesFunction
public boolean supportsDegreesFunction()
MSSQLserver only supports integer degrees, and that's not good enough.Support DBvolution at Patreon
- Overrides:
supportsDegreesFunctionin classDBDefinition- Returns:
- false
-
getStandardDeviationFunctionName
public String getStandardDeviationFunctionName()
Description copied from class:DBDefinitionProvides the function of the function that provides the standard deviation of a selection.- Overrides:
getStandardDeviationFunctionNamein classDBDefinition- Returns:
- "stddev"
-
doStringLengthTransform
public String doStringLengthTransform(String enclosedValue)
Wraps the provided SQL snippet in a statement that the length of the value of the snippet.- Overrides:
doStringLengthTransformin classDBDefinition- Parameters:
enclosedValue- enclosedValueSupport DBvolution at Patreon
- Returns:
- SQL snippet
-
getColumnAutoIncrementSuffix
public String getColumnAutoIncrementSuffix()
Description copied from class:DBDefinitionReturns the suffix added to a column definition to support auto-incrementing a column.- Overrides:
getColumnAutoIncrementSuffixin classDBDefinition- Returns:
- " GENERATED BY DEFAULT AS IDENTITY "
-
prefersLargeObjectsSetAsBase64String
public boolean prefersLargeObjectsSetAsBase64String(DBLargeObject<?> lob)
Description copied from class:DBDefinitionIndicates that the database prefers Large Object values to be set using the setCharacterStream method.If both
DBDefinition.prefersLargeObjectsSetAsCharacterStream(nz.co.gregs.dbvolution.datatypes.DBLargeObject)andDBDefinition.prefersLargeObjectsSetAsBase64String(nz.co.gregs.dbvolution.datatypes.DBLargeObject)return FALSE, DBvolution will use the setBinaryStream method to set the value.- Overrides:
prefersLargeObjectsSetAsBase64Stringin classDBDefinition- Parameters:
lob- the DBLargeObject which we are querying about.- Returns:
- the default implementation returns FALSE.
-
prefersLargeObjectsReadAsBase64CharacterStream
public boolean prefersLargeObjectsReadAsBase64CharacterStream(DBLargeObject<?> lob)
Description copied from class:DBDefinitionIndicates whether the database requires LargeObjects to be encoded as Base64 CLOBS using the CharacterStream method to read the value.- Overrides:
prefersLargeObjectsReadAsBase64CharacterStreamin classDBDefinition- Parameters:
lob- the DBLargeObject which we are querying about.- Returns:
- the default implementation returns FALSE.
-
getCurrentDateOnlyFunctionName
protected String getCurrentDateOnlyFunctionName()
Description copied from class:DBDefinitionDefines the function used to get the current date (excluding time) from the database.- Overrides:
getCurrentDateOnlyFunctionNamein classDBDefinition- Returns:
- the default implementation returns " CURRENT_DATE "
-
doBooleanToIntegerTransform
public String doBooleanToIntegerTransform(String booleanExpression)
Description copied from class:DBDefinitionTransforms a bit expression into an integer expression.Used to allow comparison of bit columns in some databases.
- Overrides:
doBooleanToIntegerTransformin classDBDefinition- Parameters:
booleanExpression- bitExpression- Returns:
- the transformation necessary to transform bitExpression into an integer expression in the SQL.
-
doDateAddSecondsTransform
public String doDateAddSecondsTransform(String dateValue, String numberOfSeconds)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfSeconds seconds to the dateValue.- Overrides:
doDateAddSecondsTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfSeconds- numberOfSeconds- Returns:
- an SQL snippet
-
doDateAddMinutesTransform
public String doDateAddMinutesTransform(String dateValue, String numberOfMinutes)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfMinutes minutes to the dateValue.- Overrides:
doDateAddMinutesTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfMinutes- numberOfMinutes- Returns:
- an SQL snippet
-
doDateAddDaysTransform
public String doDateAddDaysTransform(String dateValue, String numberOfDays)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfdays days to the dateValue.- Overrides:
doDateAddDaysTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfDays- numberOfDays- Returns:
- an SQL snippet
-
doDateAddHoursTransform
public String doDateAddHoursTransform(String dateValue, String numberOfHours)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfHours hours to the dateValue.- Overrides:
doDateAddHoursTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfHours- numberOfHours- Returns:
- an SQL snippet
-
doDateAddWeeksTransform
public String doDateAddWeeksTransform(String dateValue, String numberOfWeeks)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfWeeks weeks to the dateValue.- Overrides:
doDateAddWeeksTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfWeeks- numberOfWeeks- Returns:
- an SQL snippet
-
doDateAddMonthsTransform
public String doDateAddMonthsTransform(String dateValue, String numberOfMonths)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfMonths months to the dateValue.- Overrides:
doDateAddMonthsTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfMonths- numberOfMonths- Returns:
- an SQL snippet
-
doDateAddYearsTransform
public String doDateAddYearsTransform(String dateValue, String numberOfYears)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfYears years to the dateValue.- Overrides:
doDateAddYearsTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfYears- numberOfYears- Returns:
- an SQL snippet
-
doInstantAddSecondsTransform
public String doInstantAddSecondsTransform(String dateValue, String numberOfSeconds)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfSeconds seconds to the dateValue.- Overrides:
doInstantAddSecondsTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfSeconds- numberOfSeconds- Returns:
- an SQL snippet
-
doInstantAddMinutesTransform
public String doInstantAddMinutesTransform(String dateValue, String numberOfMinutes)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfMinutes minutes to the dateValue.- Overrides:
doInstantAddMinutesTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfMinutes- numberOfMinutes- Returns:
- an SQL snippet
-
doInstantAddDaysTransform
public String doInstantAddDaysTransform(String dateValue, String numberOfDays)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfdays days to the dateValue.- Overrides:
doInstantAddDaysTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfDays- numberOfDays- Returns:
- an SQL snippet
-
doInstantAddHoursTransform
public String doInstantAddHoursTransform(String dateValue, String numberOfHours)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfHours hours to the dateValue.- Overrides:
doInstantAddHoursTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfHours- numberOfHours- Returns:
- an SQL snippet
-
doInstantAddWeeksTransform
public String doInstantAddWeeksTransform(String dateValue, String numberOfWeeks)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfWeeks weeks to the dateValue.- Overrides:
doInstantAddWeeksTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfWeeks- numberOfWeeks- Returns:
- an SQL snippet
-
doInstantAddMonthsTransform
public String doInstantAddMonthsTransform(String dateValue, String numberOfMonths)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfMonths months to the dateValue.- Overrides:
doInstantAddMonthsTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfMonths- numberOfMonths- Returns:
- an SQL snippet
-
doInstantAddYearsTransform
public String doInstantAddYearsTransform(String dateValue, String numberOfYears)
Description copied from class:DBDefinitionDoes the required transformation to produce an SQL snippet that adds numberOfYears years to the dateValue.- Overrides:
doInstantAddYearsTransformin classDBDefinition- Parameters:
dateValue- dateValuenumberOfYears- numberOfYears- Returns:
- an SQL snippet
-
doDayDifferenceTransform
public String doDayDifferenceTransform(String dateValue, String otherDateValue)
Description copied from class:DBDefinitionConvert the 2 SQL date values into a difference in days.- Overrides:
doDayDifferenceTransformin classDBDefinition- Parameters:
dateValue- dateValueotherDateValue- otherDateValue- Returns:
- SQL
-
doWeekDifferenceTransform
public String doWeekDifferenceTransform(String dateValue, String otherDateValue)
Description copied from class:DBDefinitionConvert the 2 SQL date values into a difference in days.- Overrides:
doWeekDifferenceTransformin classDBDefinition- Parameters:
dateValue- dateValueotherDateValue- otherDateValue- Returns:
- SQL
-
doMonthDifferenceTransform
public String doMonthDifferenceTransform(String dateValue, String otherDateValue)
Description copied from class:DBDefinitionConvert the 2 SQL date values into a difference in months.- Overrides:
doMonthDifferenceTransformin classDBDefinition- Parameters:
dateValue- dateValueotherDateValue- otherDateValue- Returns:
- SQL
-
doYearDifferenceTransform
public String doYearDifferenceTransform(String dateValue, String otherDateValue)
Description copied from class:DBDefinitionConvert the 2 SQL date values into a difference in years.- Overrides:
doYearDifferenceTransformin classDBDefinition- Parameters:
dateValue- dateValueotherDateValue- otherDateValue- Returns:
- SQL
-
doHourDifferenceTransform
public String doHourDifferenceTransform(String dateValue, String otherDateValue)
Description copied from class:DBDefinitionConvert the 2 SQL date values into a difference in hours.- Overrides:
doHourDifferenceTransformin classDBDefinition- Parameters:
dateValue- dateValueotherDateValue- otherDateValue- Returns:
- SQL
-
doMinuteDifferenceTransform
public String doMinuteDifferenceTransform(String dateValue, String otherDateValue)
Description copied from class:DBDefinitionConvert the 2 SQL date values into a difference in minutes.- Overrides:
doMinuteDifferenceTransformin classDBDefinition- Parameters:
dateValue- dateValueotherDateValue- otherDateValue- Returns:
- SQL
-
doSecondDifferenceTransform
public String doSecondDifferenceTransform(String dateValue, String otherDateValue)
Description copied from class:DBDefinitionConvert the 2 SQL date values into a difference in whole seconds.- Overrides:
doSecondDifferenceTransformin classDBDefinition- Parameters:
dateValue- dateValueotherDateValue- otherDateValue- Returns:
- SQL
-
doTruncTransform
public String doTruncTransform(String realNumberExpression, String numberOfDecimalPlacesExpression)
Description copied from class:DBDefinitionTransforms 2 SQL snippets that represent a real number and a integer into a real number with the decimal places reduced to the integer.0 decimal places transforms the real number into an integer.
- Overrides:
doTruncTransformin classDBDefinition- Parameters:
realNumberExpression- realNumberExpressionnumberOfDecimalPlacesExpression- numberOfDecimalPlacesExpression- Returns:
- an expression that reduces the realNumberExpression to only the number of decimal places in numberOfDecimalPlacesExpression.
-
doYearTransform
public String doYearTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the year part of the date.- Overrides:
doYearTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the year of the supplied date.
-
doMonthTransform
public String doMonthTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the month part of the date.- Overrides:
doMonthTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the month of the supplied date.
-
doDayTransform
public String doDayTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the day part of the date.Day in this sense is the number of the day within the month: that is the 23 part of Monday 25th of August 2014
- Overrides:
doDayTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the day of the supplied date.
-
doHourTransform
public String doHourTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the hour part of the date.- Overrides:
doHourTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the hour of the supplied date.
-
doMinuteTransform
public String doMinuteTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the minute part of the date.- Overrides:
doMinuteTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the minute of the supplied date.
-
doSecondTransform
public String doSecondTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the second part of the date.Returns only the integer part of the second. Use
DBDefinition.doSecondAndSubsecondTransform(java.lang.String)orDBDefinition.doSubsecondTransform(java.lang.String)to get the whole second value or the sub-second part- Overrides:
doSecondTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the second of the supplied date.
-
doSecondAndSubsecondTransform
public String doSecondAndSubsecondTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the second part of the date.- Overrides:
doSecondAndSubsecondTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the second of the supplied date.
-
doSubsecondTransform
public String doSubsecondTransform(String dateExpression)
Description copied from class:DBDefinitionReturns the partial second value from the date.This should return the most detailed possible value less than a second for the date expression provided. It should always return a value less than 1s.
- Overrides:
doSubsecondTransformin classDBDefinition- Parameters:
dateExpression- the date from which to get the subsecond part of.- Returns:
- SQL
-
doInstantYearTransform
public String doInstantYearTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the year part of the date.- Overrides:
doInstantYearTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the year of the supplied date.
-
doInstantMonthTransform
public String doInstantMonthTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the month part of the date.- Overrides:
doInstantMonthTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the month of the supplied date.
-
doInstantDayTransform
public String doInstantDayTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the day part of the date.Day in this sense is the number of the day within the month: that is the 23 part of Monday 25th of August 2014
- Overrides:
doInstantDayTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the day of the supplied date.
-
doInstantHourTransform
public String doInstantHourTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the hour part of the date.- Overrides:
doInstantHourTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the hour of the supplied date.
-
doInstantMinuteTransform
public String doInstantMinuteTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the minute part of the date.- Overrides:
doInstantMinuteTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the minute of the supplied date.
-
doInstantSecondTransform
public String doInstantSecondTransform(String dateExpression)
Description copied from class:DBDefinitionTransforms a SQL snippet that is assumed to be a date into an SQL snippet that provides the second part of the date.- Overrides:
doInstantSecondTransformin classDBDefinition- Parameters:
dateExpression- dateExpression- Returns:
- a SQL snippet that will produce the second of the supplied date.
-
doInstantSubsecondTransform
public String doInstantSubsecondTransform(String dateExpression)
Description copied from class:DBDefinitionReturns the partial second value from the date.This should return the most detailed possible value less than a second for the date expression provided. It should always return a value less than 1s.
- Overrides:
doInstantSubsecondTransformin classDBDefinition- Parameters:
dateExpression- the date from which to get the subsecond part of.- Returns:
- SQL
-
supportsComparingBooleanResults
public boolean supportsComparingBooleanResults()
Description copied from class:DBDefinitionIndicates whether the database supports statements that compares to boolean values using EQUALS, NOT EQUALS, etc.If the database supports statements that resolve to "true = true", this method will return TRUE.
Internally this method is used to allow DBvolution to alter the SQL for MS SQLServer so that DBBoolean columns can be compared like with other databases.
- Overrides:
supportsComparingBooleanResultsin classDBDefinition- Returns:
- TRUE if this database can compare boolean values, FALSE otherwise.
-
supportsLeastOfNatively
protected boolean supportsLeastOfNatively()
MS SQLServer does not support the LEASTOF operation natively.Support DBvolution at Patreon
- Overrides:
supportsLeastOfNativelyin classDBDefinition- Returns:
- FALSE
-
supportsGreatestOfNatively
protected boolean supportsGreatestOfNatively()
MS SQLServer does not support the GREATESTOF operation natively.Support DBvolution at Patreon
- Overrides:
supportsGreatestOfNativelyin classDBDefinition- Returns:
- FALSE
-
supportsPurelyFunctionalGroupByColumns
public boolean supportsPurelyFunctionalGroupByColumns()
MS SQLServer does not support the grouping by columns that do not access table data.Support DBvolution at Patreon
- Overrides:
supportsPurelyFunctionalGroupByColumnsin classDBDefinition- Returns:
- FALSE
-
doNumberToStringTransformUnsafe
protected String doNumberToStringTransformUnsafe(String numberExpression)
Transforms a SQL snippet of a number expression into a character expression for this database.- Overrides:
doNumberToStringTransformUnsafein classDBDefinition- Parameters:
numberExpression- numberExpressionSupport DBvolution at Patreon
- Returns:
- a String of the SQL required to transform the number supplied into a character or String type.
-
doIntegerToStringTransformUnsafe
protected String doIntegerToStringTransformUnsafe(String numberExpression)
Transforms a SQL snippet of a integer expression into a character expression for this database.- Overrides:
doIntegerToStringTransformUnsafein classDBDefinition- Parameters:
numberExpression- numberExpressionSupport DBvolution at Patreon
- Returns:
- a String of the SQL required to transform the number supplied into a character or String type.
-
beginWithClause
public String beginWithClause()
Description copied from class:DBDefinitionThe beginning of the WITH variant supported by this database.- Overrides:
beginWithClausein classDBDefinition- Returns:
- "WITH RECURSIVE" by default.
-
getCurrentZonedDateTimeFunction
protected String getCurrentZonedDateTimeFunction()
Defines the function used to get the current timestamp from the database.- Overrides:
getCurrentZonedDateTimeFunctionin classDBDefinition- Returns:
- the default implementation returns " CURRENT_TIMESTAMP "
-
getCurrentDateTimeFunction
protected String getCurrentDateTimeFunction()
Description copied from class:DBDefinitionDefines the function used to get the current timestamp from the database.- Overrides:
getCurrentDateTimeFunctionin classDBDefinition- Returns:
- the default implementation returns " CURRENT_TIMESTAMP "
-
doCurrentUTCDateTimeTransform
public String doCurrentUTCDateTimeTransform()
- Overrides:
doCurrentUTCDateTimeTransformin classDBDefinition
-
doDayOfWeekTransform
public String doDayOfWeekTransform(String dateSQL)
Description copied from class:DBDefinitionExtracts the weekday from the date provided as a number from 1 to 7.Provides access to the day of the week as a number from 1 for Sunday to 7 for Saturday.
- Specified by:
doDayOfWeekTransformin classDBDefinition- Parameters:
dateSQL- the date to get the day of the week for.- Returns:
- a number between 1 and 7 for the weekday.
-
doInstantDayOfWeekTransform
public String doInstantDayOfWeekTransform(String dateSQL)
Description copied from class:DBDefinitionExtracts the weekday from the date provided as a number from 1 to 7.Provides access to the day of the week as a number from 1 for Sunday to 7 for Saturday.
- Specified by:
doInstantDayOfWeekTransformin classDBDefinition- Parameters:
dateSQL- the date to get the day of the week for.- Returns:
- a number between 1 and 7 for the weekday.
-
doRoundTransform
public String doRoundTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL to apply rounding to the Number expressions- Overrides:
doRoundTransformin classDBDefinition- Parameters:
toSQLString- the number value- Returns:
- SQL
-
doRoundWithDecimalPlacesTransform
public String doRoundWithDecimalPlacesTransform(String number, String decimalPlaces)
Description copied from class:DBDefinitionGenerate the SQL to apply rounding to the Number expressions with the specified number of decimal places.- Overrides:
doRoundWithDecimalPlacesTransformin classDBDefinition- Parameters:
number- the number valuedecimalPlaces- the number value of the decimal places required.- Returns:
- SQL
-
supportsArraysNatively
public boolean supportsArraysNatively()
Description copied from class:DBDefinitionIndicates if the database supports ARRAYs natively and the functionality has been implemented.- Overrides:
supportsArraysNativelyin classDBDefinition- Returns:
- TRUE by default.
-
getArctan2FunctionName
public String getArctan2FunctionName()
Description copied from class:DBDefinitionProvides the ARCTAN2 function name for this database.- Overrides:
getArctan2FunctionNamein classDBDefinition- Returns:
- "atan2" by default.
-
supportsHyperbolicFunctionsNatively
public boolean supportsHyperbolicFunctionsNatively()
Description copied from class:DBDefinitionIndicates that this database supports hyperbolic functions natively.- Overrides:
supportsHyperbolicFunctionsNativelyin classDBDefinition- Returns:
- TRUE by default.
-
doStringToNumberTransform
public String doStringToNumberTransform(String stringResultContainingANumber)
Description copied from class:DBDefinitionProvide SQL to interpret the String value as a number.Full of ways to fail this is.
- Overrides:
doStringToNumberTransformin classDBDefinition- Parameters:
stringResultContainingANumber- a number value to be coerced to string- Returns:
- SQL that converts the string value into number.
-
transformToStorableType
public DBExpression transformToStorableType(DBExpression columnExpression)
Description copied from class:DBDefinitionTransform a datatype not supported by the database into a type that the database does support.Used mostly to turn Booleans into numbers.
By default this method just returns the input DBExpression.
- Overrides:
transformToStorableTypein classDBDefinition- Parameters:
columnExpression- a column expression that might need to change type for this database- Returns:
- The DBExpression as a DBExpression supported by the database.
-
transformToSelectableType
public DBExpression transformToSelectableType(DBExpression columnExpression)
- Overrides:
transformToSelectableTypein classDBDefinition
-
transformToGroupableType
public DBExpression transformToGroupableType(DBExpression expression)
- Overrides:
transformToGroupableTypein classDBDefinition
-
transformToWhenableType
public DBExpression transformToWhenableType(BooleanExpression test)
- Overrides:
transformToWhenableTypein classDBDefinition
-
transformToSortableType
public DBExpression transformToSortableType(DBExpression columnExpression)
Description copied from class:DBDefinitionTransform a datatype not supported by the database into a type that the database does support.Used mostly to turn Booleans into numbers.
By default this method just returns the input DBExpression.
- Overrides:
transformToSortableTypein classDBDefinition- Parameters:
columnExpression- a column expression that might need to change type for this database- Returns:
- The DBExpression as a DBExpression supported by the database.
-
doPoint2DEqualsTransform
public String doPoint2DEqualsTransform(String firstPoint, String secondPoint)
Description copied from class:DBDefinitionProvide the SQL to compare 2 Point2Ds- Overrides:
doPoint2DEqualsTransformin classDBDefinition- Parameters:
firstPoint- a point2d value to comparesecondPoint- a point2d value to compare- Returns:
- SQL
-
doPoint2DGetXTransform
public String doPoint2DGetXTransform(String point2D)
Description copied from class:DBDefinitionProvide the SQL to return the X coordinate of the Point2D- Overrides:
doPoint2DGetXTransformin classDBDefinition- Parameters:
point2D- a point2d value- Returns:
- SQL
-
doPoint2DGetYTransform
public String doPoint2DGetYTransform(String point2D)
Description copied from class:DBDefinitionProvide the SQL to return the Y coordinate of the Point2D- Overrides:
doPoint2DGetYTransformin classDBDefinition- Parameters:
point2D- a point2d value- Returns:
- SQL
-
doPoint2DMeasurableDimensionsTransform
public String doPoint2DMeasurableDimensionsTransform(String point2D)
Description copied from class:DBDefinitionProvide the SQL to return the dimension of the Point2DPoint is a 0-dimensional objects for this purpose.
- Overrides:
doPoint2DMeasurableDimensionsTransformin classDBDefinition- Parameters:
point2D- a point2d value- Returns:
- SQL
-
doPoint2DGetBoundingBoxTransform
public String doPoint2DGetBoundingBoxTransform(String point2D)
Description copied from class:DBDefinitionProvide the SQL to derive the Polygon2D representing the Bounding Box of the Point2D.- Overrides:
doPoint2DGetBoundingBoxTransformin classDBDefinition- Parameters:
point2D- a point2d value- Returns:
- SQL
-
doPoint2DAsTextTransform
public String doPoint2DAsTextTransform(String point2DString)
Description copied from class:DBDefinitionProvide the SQL to derive the WKT version of the Point2D.- Overrides:
doPoint2DAsTextTransformin classDBDefinition- Parameters:
point2DString- a point2d value- Returns:
- SQL
-
doLine2DAsTextTransform
public String doLine2DAsTextTransform(String line2DSQL)
Description copied from class:DBDefinitionProvide the SQL to derive the WKT version of the Line2D.- Overrides:
doLine2DAsTextTransformin classDBDefinition- Parameters:
line2DSQL- a line2d value- Returns:
- SQL
-
doLine2DGetMinYTransform
public String doLine2DGetMinYTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL that will return the smallest Y value within the Line2D expression.- Overrides:
doLine2DGetMinYTransformin classDBDefinition- Parameters:
toSQLString- the line2d value- Returns:
- SQL
-
doLine2DGetMaxYTransform
public String doLine2DGetMaxYTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL that will return the largest Y value within the Line2D expression.- Overrides:
doLine2DGetMaxYTransformin classDBDefinition- Parameters:
toSQLString- the line2 value- Returns:
- SQL
-
doLine2DGetMinXTransform
public String doLine2DGetMinXTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL that will return the smallest X value within the Line2D expression.- Overrides:
doLine2DGetMinXTransformin classDBDefinition- Parameters:
toSQLString- the line2d value- Returns:
- SQL
-
doLine2DGetMaxXTransform
public String doLine2DGetMaxXTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL that will return the largest X value within the Line2D expression.- Overrides:
doLine2DGetMaxXTransformin classDBDefinition- Parameters:
toSQLString- the line2d value- Returns:
- SQL
-
doLine2DGetBoundingBoxTransform
public String doLine2DGetBoundingBoxTransform(String toSQLString)
Description copied from class:DBDefinitionCreate the SQL to derive the bounding box of this Line2D SQL- Overrides:
doLine2DGetBoundingBoxTransformin classDBDefinition- Parameters:
toSQLString- the line2d value- Returns:
- SQL
-
doLine2DMeasurableDimensionsTransform
public String doLine2DMeasurableDimensionsTransform(String toSQLString)
Description copied from class:DBDefinitionCreate the SQL required to get the dimension of this Line2D SQL.- Overrides:
doLine2DMeasurableDimensionsTransformin classDBDefinition- Parameters:
toSQLString- the line2d value- Returns:
- the dimension (probably 1)
-
doLine2DEqualsTransform
public String doLine2DEqualsTransform(String toSQLString, String toSQLString0)
Description copied from class:DBDefinitionTransform the 2 Line2D SQL snippets into an EQUALS comparison of the 2- Overrides:
doLine2DEqualsTransformin classDBDefinition- Parameters:
toSQLString- the first line2d value to comparetoSQLString0- the second line2d value to compare- Returns:
- SQL
-
doLine2DIntersectsLine2DTransform
public String doLine2DIntersectsLine2DTransform(String firstLine, String secondLine)
Description copied from class:DBDefinitionGenerates the SQL required to find whether the 2 lines cross at any point.- Overrides:
doLine2DIntersectsLine2DTransformin classDBDefinition- Parameters:
firstLine- the first line2d value to comparesecondLine- the second line2d value to compare- Returns:
- an SQL expression that will evaluate to TRUE FALSE or NULL, depending on whether the lines cross at any point.
-
doLine2DIntersectionPointWithLine2DTransform
public String doLine2DIntersectionPointWithLine2DTransform(String firstLine, String secondLine)
Description copied from class:DBDefinitionGenerate the SQL required to find the intersection point of the 2 line segment SQL expressions.- Overrides:
doLine2DIntersectionPointWithLine2DTransformin classDBDefinition- Parameters:
firstLine- the first line2d to comparesecondLine- the second line2d to compare- Returns:
- an SQL expression that will evaluate to the intersection point of the 2 line segments or NULL.
-
doLine2DAllIntersectionPointsWithLine2DTransform
public String doLine2DAllIntersectionPointsWithLine2DTransform(String firstGeometry, String secondGeometry)
Description copied from class:DBDefinitionGenerate the SQL required to find the complete set of all points of intersection between the tow 2 lines.- Overrides:
doLine2DAllIntersectionPointsWithLine2DTransformin classDBDefinition- Parameters:
firstGeometry- the first line2d to comparesecondGeometry- the second line2d to compare- Returns:
- an SQL expression that will evaluate to the intersection point of the 2 line segments or NULL.
-
transformLineStringIntoDatabaseLine2DFormat
public String transformLineStringIntoDatabaseLine2DFormat(com.vividsolutions.jts.geom.LineString line)
Description copied from class:DBDefinitionProvide the SQL that correctly represents this LineString in this database.- Overrides:
transformLineStringIntoDatabaseLine2DFormatin classDBDefinition- Parameters:
line- a linestring to transform in to a Line2D value- Returns:
- SQL
-
transformCoordinatesIntoDatabasePoint2DFormat
public String transformCoordinatesIntoDatabasePoint2DFormat(String xValue, String yValue)
Description copied from class:DBDefinitionProvide the SQL that correctly represents these coordinates in this database.The same as
DBDefinition.transformPoint2DIntoDatabaseFormat(com.vividsolutions.jts.geom.Point)but for two coordinates as SQL.- Overrides:
transformCoordinatesIntoDatabasePoint2DFormatin classDBDefinition- Parameters:
xValue- a number valueyValue- a number value- Returns:
- SQL
-
transformPoint2DIntoDatabaseFormat
public String transformPoint2DIntoDatabaseFormat(com.vividsolutions.jts.geom.Point point)
Description copied from class:DBDefinitionProvide the SQL that correctly represents this Point2D in this database.- Overrides:
transformPoint2DIntoDatabaseFormatin classDBDefinition- Parameters:
point- a point to be turned into an SQL point2d value.- Returns:
- SQL
-
transformPolygonIntoDatabasePolygon2DFormat
public String transformPolygonIntoDatabasePolygon2DFormat(com.vividsolutions.jts.geom.Polygon polygon2DInWKTFormat)
Description copied from class:DBDefinitionGenerate the SQL that will transform a WKT version of a Polygon2D into the database's version of a Polygon2D.- Overrides:
transformPolygonIntoDatabasePolygon2DFormatin classDBDefinition- Parameters:
polygon2DInWKTFormat- the polygon2d value- Returns:
- SQL
-
transformCoordinateArrayToDatabasePolygon2DFormat
public String transformCoordinateArrayToDatabasePolygon2DFormat(List<String> coordinateSQL)
Description copied from class:DBDefinitionOverride this method to provide the SQL that will create a database Polygon2D value from the list of presumed coordinates.Coordinates are a series of number values that are presumed to be pairs of X and Y values. That is to say the list is a list number values with no formatting other than that required to express the values as numbers.
- Overrides:
transformCoordinateArrayToDatabasePolygon2DFormatin classDBDefinition- Parameters:
coordinateSQL- lots of numbers- Returns:
- a polygon2d value
-
transformPoint2DArrayToDatabasePolygon2DFormat
public String transformPoint2DArrayToDatabasePolygon2DFormat(List<String> pointSQL)
Description copied from class:DBDefinitionCreate the SQL to transform a Point2DArray SQL into a Polygon2D- Overrides:
transformPoint2DArrayToDatabasePolygon2DFormatin classDBDefinition- Parameters:
pointSQL- the point2d value- Returns:
- SQL
-
doPolygon2DAsTextTransform
public String doPolygon2DAsTextTransform(String polygonSQL)
Description copied from class:DBDefinitionGenerates the SQL to convert the polygon to the standard text version of a polygon.- Overrides:
doPolygon2DAsTextTransformin classDBDefinition- Parameters:
polygonSQL- the polygon2d value- Returns:
- SQL
-
doPolygon2DIntersectionTransform
public String doPolygon2DIntersectionTransform(String firstGeometry, String secondGeometry)
Description copied from class:DBDefinitionCreates a Polygon2D representing the intersection of the Polygon2Ds.- Overrides:
doPolygon2DIntersectionTransformin classDBDefinition- Parameters:
firstGeometry- the first polygon2d valuesecondGeometry- the second polygon2d value- Returns:
- SQL that represents a polygon of the intersection, null if there is no intersection.
-
doPolygon2DOverlapsTransform
public String doPolygon2DOverlapsTransform(String firstGeometry, String secondGeometry)
Description copied from class:DBDefinitionTest whether the 2 polygons intersect but not contained or within.- Overrides:
doPolygon2DOverlapsTransformin classDBDefinition- Parameters:
firstGeometry- the first polygon2d value to comparesecondGeometry- the second polygon2d value to compare- Returns:
- SQL that is TRUE if the polygons have intersecting and non-intersecting parts.
-
doPolygon2DIntersectsTransform
public String doPolygon2DIntersectsTransform(String firstGeometry, String secondGeometry)
Description copied from class:DBDefinitionTest whether the 2 polygons intersect.- Overrides:
doPolygon2DIntersectsTransformin classDBDefinition- Parameters:
firstGeometry- the first polygon2d value to comparesecondGeometry- the second polygon2d value to compare- Returns:
- SQL that returns TRUE if they intersect.
-
doPolygon2DTouchesTransform
public String doPolygon2DTouchesTransform(String firstGeometry, String secondGeometry)
Description copied from class:DBDefinitionTests whether the polygons touch.Checks that a) the polygons have at least on point in common and b) that their interiors do not overlap.
- Overrides:
doPolygon2DTouchesTransformin classDBDefinition- Parameters:
firstGeometry- the first polygon2d value to comparesecondGeometry- the second polygon2d value to compare- Returns:
- SQL snippet
-
doPolygon2DGetAreaTransform
public String doPolygon2DGetAreaTransform(String toSQLString)
Description copied from class:DBDefinitionRetrieve the area of the polygon.- Overrides:
doPolygon2DGetAreaTransformin classDBDefinition- Parameters:
toSQLString- a polygon2D value- Returns:
- SQL that will return the area of the Polygon2D
-
doPolygon2DGetBoundingBoxTransform
public String doPolygon2DGetBoundingBoxTransform(String toSQLString)
Description copied from class:DBDefinitionCreate a simple four sided bounding for the polygon.- Overrides:
doPolygon2DGetBoundingBoxTransformin classDBDefinition- Parameters:
toSQLString- a polygon2D value- Returns:
- the SQL required to create a bounding box for the polygon.
-
doPolygon2DEqualsTransform
public String doPolygon2DEqualsTransform(String firstGeometry, String secondGeometry)
Description copied from class:DBDefinitionCompare 2 polygons with EQUALS.- Overrides:
doPolygon2DEqualsTransformin classDBDefinition- Parameters:
firstGeometry- the first polygon2d value to comparesecondGeometry- the second polygon2d value to compare- Returns:
- SQL
-
doPolygon2DContainsPolygon2DTransform
public String doPolygon2DContainsPolygon2DTransform(String firstGeometry, String secondGeometry)
Test whether the first polygon completely contains the second polygon.- Overrides:
doPolygon2DContainsPolygon2DTransformin classDBDefinition- Parameters:
firstGeometry- the first polygon2d value to comparesecondGeometry- the second polygon2d value to compareSupport DBvolution at Patreon
- Returns:
- SQL that is TRUE if the first polygon contains the second.
-
doPolygon2DContainsPoint2DTransform
public String doPolygon2DContainsPoint2DTransform(String polygon2DSQL, String point2DSQL)
Description copied from class:DBDefinitionGenerates the SQL to determine whether the first (polygon) argument contains the second point argument.- Overrides:
doPolygon2DContainsPoint2DTransformin classDBDefinition- Parameters:
polygon2DSQL- the polygon2d to compare withpoint2DSQL- the point2d value that might be inside the polygon2d- Returns:
- SQL
-
doPolygon2DDoesNotIntersectTransform
public String doPolygon2DDoesNotIntersectTransform(String firstGeometry, String secondGeometry)
Inverse ofdoPolygon2DIntersectsTransform(java.lang.String, java.lang.String), tests whether the 2 polygons are non-coincident.- Overrides:
doPolygon2DDoesNotIntersectTransformin classDBDefinition- Parameters:
firstGeometry- the first polygon2d value to comparesecondGeometry- the second polygon2d value to compareSupport DBvolution at Patreon
- Returns:
- SQL that is FALSE if the polygons intersect.
-
doPolygon2DWithinTransform
public String doPolygon2DWithinTransform(String firstGeometry, String secondGeometry)
Test whether the first polygon is completely within the second polygon.Compare this to
doPolygon2DContainsPolygon2DTransform(java.lang.String, java.lang.String)- Overrides:
doPolygon2DWithinTransformin classDBDefinition- Parameters:
firstGeometry- the first polygon2d value to comparesecondGeometry- the second polygon2d value to compareSupport DBvolution at Patreon
- Returns:
- SQL that is TRUE if the first polygon is within the second.
-
doPolygon2DMeasurableDimensionsTransform
public String doPolygon2DMeasurableDimensionsTransform(String polygon2DSQL)
Returns the dimension of the polygon.This will be "2"
- Overrides:
doPolygon2DMeasurableDimensionsTransformin classDBDefinition- Parameters:
polygon2DSQL- a polygon2d valueSupport DBvolution at Patreon
- Returns:
- "2" unless something has gone horribly wrong.
-
doPolygon2DGetExteriorRingTransform
public String doPolygon2DGetExteriorRingTransform(String polygon2DSQL)
Description copied from class:DBDefinitionDefines the transformation require to transform an SQL Polygon2D into a linestring representing the exterior ring of the polygon.- Overrides:
doPolygon2DGetExteriorRingTransformin classDBDefinition- Parameters:
polygon2DSQL- a polygon2D value- Returns:
- SQL
-
doPolygon2DGetMaxXTransform
public String doPolygon2DGetMaxXTransform(String polygon2DSQL)
Description copied from class:DBDefinitionGenerate the SQL that will return the largest X value within the Polygon2D expression.- Overrides:
doPolygon2DGetMaxXTransformin classDBDefinition- Parameters:
polygon2DSQL- the polygon2d value- Returns:
- SQL
-
doPolygon2DGetMinXTransform
public String doPolygon2DGetMinXTransform(String polygon2DSQL)
Description copied from class:DBDefinitionGenerate the SQL that will return the smallest X value within the Polygon2D expression.- Overrides:
doPolygon2DGetMinXTransformin classDBDefinition- Parameters:
polygon2DSQL- the polygon2d value- Returns:
- SQL
-
doPolygon2DGetMaxYTransform
public String doPolygon2DGetMaxYTransform(String polygon2DSQL)
Description copied from class:DBDefinitionGenerate the SQL that will return the largest X value within the Polygon2D expression.- Overrides:
doPolygon2DGetMaxYTransformin classDBDefinition- Parameters:
polygon2DSQL- the polygon2d value- Returns:
- SQL
-
doPolygon2DGetMinYTransform
public String doPolygon2DGetMinYTransform(String polygon2DSQL)
Description copied from class:DBDefinitionGenerate the SQL that will return the smallest Y value within the Polygon2D expression.- Overrides:
doPolygon2DGetMinYTransformin classDBDefinition- Parameters:
polygon2DSQL- the polygon2d value- Returns:
- SQL
-
transformDatabaseLineSegment2DValueToJTSLineSegment
public com.vividsolutions.jts.geom.LineSegment transformDatabaseLineSegment2DValueToJTSLineSegment(String lineSegmentAsSQL) throws com.vividsolutions.jts.io.ParseException
Description copied from class:DBDefinitionConvert the String object returned by the database into a JTS LineSegment object.- Overrides:
transformDatabaseLineSegment2DValueToJTSLineSegmentin classDBDefinition- Parameters:
lineSegmentAsSQL- the database linesegment2d value to create aJTS LineSegmentwith- Returns:
- a JTS LineSegment derived from the database's response, may be null.
- Throws:
com.vividsolutions.jts.io.ParseException- malformed WKT will throw an exception
-
transformLineSegmentIntoDatabaseLineSegment2DFormat
public String transformLineSegmentIntoDatabaseLineSegment2DFormat(com.vividsolutions.jts.geom.LineSegment lineSegment)
Description copied from class:DBDefinitionConvert the JTS LineSegment object into a SQL expression that the database will accept as a line segment.By default, creates a WKT representation
- Overrides:
transformLineSegmentIntoDatabaseLineSegment2DFormatin classDBDefinition- Parameters:
lineSegment- the LineSegment to convert to database format.- Returns:
- an SQL expression that can be interpreted by the database as a line segment.
-
doLineSegment2DIntersectsLineSegment2DTransform
public String doLineSegment2DIntersectsLineSegment2DTransform(String toSQLString, String toSQLString0)
Description copied from class:DBDefinitionGenerates the database specific SQL for testing whether the 2 line segment expressions ever cross.- Overrides:
doLineSegment2DIntersectsLineSegment2DTransformin classDBDefinition- Parameters:
toSQLString- the first Line2D value to comparetoSQLString0- the second Line2D value to compare- Returns:
- an SQL expression that will report whether the 2 line segments intersect.
- See Also:
DBDefinition.doLineSegment2DIntersectionPointWithLineSegment2DTransform(java.lang.String, java.lang.String)
-
doLineSegment2DGetMaxXTransform
public String doLineSegment2DGetMaxXTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL required to find the largest X value in the line segment SQL expression.- Overrides:
doLineSegment2DGetMaxXTransformin classDBDefinition- Parameters:
toSQLString- the LineSegment2D value- Returns:
- SQL
-
doLineSegment2DGetMinXTransform
public String doLineSegment2DGetMinXTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL required to find the smallest X value in the line segment SQL expression.- Overrides:
doLineSegment2DGetMinXTransformin classDBDefinition- Parameters:
toSQLString- the LineSegment2D value- Returns:
- SQL
-
doLineSegment2DGetMaxYTransform
public String doLineSegment2DGetMaxYTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL required to find the largest Y value in the line segment SQL expression.- Overrides:
doLineSegment2DGetMaxYTransformin classDBDefinition- Parameters:
toSQLString- the LineSegment2D value- Returns:
- SQL
-
doLineSegment2DGetMinYTransform
public String doLineSegment2DGetMinYTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL required to find the smallest Y value in the line segment SQL expression.- Overrides:
doLineSegment2DGetMinYTransformin classDBDefinition- Parameters:
toSQLString- the LineSegment2D value- Returns:
- SQL
-
doLineSegment2DGetBoundingBoxTransform
public String doLineSegment2DGetBoundingBoxTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL required to the rectangular boundary that fully encloses the line segment SQL expression.- Overrides:
doLineSegment2DGetBoundingBoxTransformin classDBDefinition- Parameters:
toSQLString- the LineSegment2D value- Returns:
- SQL
-
doLineSegment2DDimensionTransform
public String doLineSegment2DDimensionTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL required to find the dimension of the line segment SQL expression.- Overrides:
doLineSegment2DDimensionTransformin classDBDefinition- Parameters:
toSQLString- the LineSegment2D value- Returns:
- SQL
-
doLineSegment2DNotEqualsTransform
public String doLineSegment2DNotEqualsTransform(String toSQLString, String toSQLString0)
Description copied from class:DBDefinitionGenerate the SQL required to find whether the 2 line segment SQL expressions are NOT equal.- Overrides:
doLineSegment2DNotEqualsTransformin classDBDefinition- Parameters:
toSQLString- the first LineSegment2D valuetoSQLString0- the second LineSegment2D value- Returns:
- SQL
-
doLineSegment2DEqualsTransform
public String doLineSegment2DEqualsTransform(String toSQLString, String toSQLString0)
Description copied from class:DBDefinitionGenerate the SQL required to find whether the 2 line segment SQL expressions are equal.- Overrides:
doLineSegment2DEqualsTransformin classDBDefinition- Parameters:
toSQLString- the first LineSegment2D valuetoSQLString0- the second LineSegment2D value- Returns:
- SQL
-
doLineSegment2DAsTextTransform
public String doLineSegment2DAsTextTransform(String toSQLString)
Description copied from class:DBDefinitionGenerate the SQL required to convert the line segment SQL expression into the WKT string format.- Overrides:
doLineSegment2DAsTextTransformin classDBDefinition- Parameters:
toSQLString- the LineSegment2D value- Returns:
- SQL
-
doLineSegment2DIntersectionPointWithLineSegment2DTransform
public String doLineSegment2DIntersectionPointWithLineSegment2DTransform(String firstLineSegment, String secondLineSegment)
Description copied from class:DBDefinitionGenerate the SQL required to find the intersection point of the 2 line segment SQL expressions.- Overrides:
doLineSegment2DIntersectionPointWithLineSegment2DTransformin classDBDefinition- Parameters:
firstLineSegment- the first LineSegment2D valuesecondLineSegment- the second LineSegment2D value- Returns:
- an SQL expression that will evaluate to the intersection point of the 2 line segments or NULL.
-
transformMultiPoint2DToDatabaseMultiPoint2DValue
public String transformMultiPoint2DToDatabaseMultiPoint2DValue(com.vividsolutions.jts.geom.MultiPoint points)
Description copied from class:DBDefinitionProvide the SQL that correctly represents this MultiPoint2D value in this database.- Overrides:
transformMultiPoint2DToDatabaseMultiPoint2DValuein classDBDefinition- Parameters:
points- the MultiPoint2D value- Returns:
- SQL
-
transformDatabaseMultiPoint2DValueToJTSMultiPoint
public com.vividsolutions.jts.geom.MultiPoint transformDatabaseMultiPoint2DValueToJTSMultiPoint(String pointsAsString) throws com.vividsolutions.jts.io.ParseException
Description copied from class:DBDefinitionConvert the database's string representation of a MultiPoint2D value into a MultiPoint..- Overrides:
transformDatabaseMultiPoint2DValueToJTSMultiPointin classDBDefinition- Parameters:
pointsAsString- the MultiPoint2D value to create aJTS MultiPointwith.- Returns:
- the MultiPoint2D as a
JTS MultiPointinstance - Throws:
com.vividsolutions.jts.io.ParseException- malformed WKT values will throw an exception
-
transformDatabasePoint2DValueToJTSPoint
public com.vividsolutions.jts.geom.Point transformDatabasePoint2DValueToJTSPoint(String pointsAsString) throws com.vividsolutions.jts.io.ParseException
Description copied from class:DBDefinitionFrom the database's representation of a Point2D create a JTS Point.This is the inverse of
DBDefinition.transformPoint2DIntoDatabaseFormat(com.vividsolutions.jts.geom.Point).- Overrides:
transformDatabasePoint2DValueToJTSPointin classDBDefinition- Parameters:
pointsAsString- a point2d value- Returns:
- a point created from the point2d value
- Throws:
com.vividsolutions.jts.io.ParseException- if the database result is not a valid WKT
-
doMultiPoint2DEqualsTransform
public String doMultiPoint2DEqualsTransform(String first, String second)
Description copied from class:DBDefinitionProvide the SQL to compare 2 MultiPoint2Ds using the equivalent of EQUALS.- Overrides:
doMultiPoint2DEqualsTransformin classDBDefinition- Parameters:
first- the first MultiPoint2D value to comparesecond- the second MultiPoint2D value to compare- Returns:
- SQL
-
doMultiPoint2DGetPointAtIndexTransform
public String doMultiPoint2DGetPointAtIndexTransform(String first, String index)
Description copied from class:DBDefinitionProvide the SQL to get point at the supplied index within the MultiPoint2D- Overrides:
doMultiPoint2DGetPointAtIndexTransformin classDBDefinition- Parameters:
first- the first MultiPoint2D value to retrieve a point from.index- the index at which the required point is at.- Returns:
- SQL
-
doMultiPoint2DGetNumberOfPointsTransform
public String doMultiPoint2DGetNumberOfPointsTransform(String first)
Description copied from class:DBDefinitionProvides the SQL the derive the number of points in the multipoint2d value.- Overrides:
doMultiPoint2DGetNumberOfPointsTransformin classDBDefinition- Parameters:
first- the MultiPoint2D value- Returns:
- SQL
-
doMultiPoint2DMeasurableDimensionsTransform
public String doMultiPoint2DMeasurableDimensionsTransform(String first)
Description copied from class:DBDefinitionProvides the SQL the derive the dimension (2 basically) of the MultiPoint2D value.- Overrides:
doMultiPoint2DMeasurableDimensionsTransformin classDBDefinition- Parameters:
first- the MultiPoint2D value- Returns:
- SQL
-
doMultiPoint2DGetBoundingBoxTransform
public String doMultiPoint2DGetBoundingBoxTransform(String first)
Description copied from class:DBDefinitionProvides the SQL the derive the bounding box containing all the points in the MultiPoint2D value.- Overrides:
doMultiPoint2DGetBoundingBoxTransformin classDBDefinition- Parameters:
first- the MultiPoint2D value- Returns:
- SQL
-
doMultiPoint2DAsTextTransform
public String doMultiPoint2DAsTextTransform(String first)
Description copied from class:DBDefinitionProvides the SQL the transform the MultiPoint2D value into a WKT value.- Overrides:
doMultiPoint2DAsTextTransformin classDBDefinition- Parameters:
first- the MultiPoint2D value- Returns:
- SQL
-
doMultiPoint2DToLine2DTransform
public String doMultiPoint2DToLine2DTransform(String first)
Description copied from class:DBDefinitionProvides the SQL the transform the MultiPoint2D value into aLine2DResultvalue.- Overrides:
doMultiPoint2DToLine2DTransformin classDBDefinition- Parameters:
first- the MultiPoint2D value- Returns:
- SQL
-
doMultiPoint2DGetMinYTransform
public String doMultiPoint2DGetMinYTransform(String first)
Description copied from class:DBDefinitionProvides the SQL that will derive the smallest Y value of all the points in the MultiPoint2D value- Overrides:
doMultiPoint2DGetMinYTransformin classDBDefinition- Parameters:
first- the MultiPoint2D value- Returns:
- SQL
-
doMultiPoint2DGetMinXTransform
public String doMultiPoint2DGetMinXTransform(String first)
Description copied from class:DBDefinitionProvides the SQL that will derive the smallest X value of all the points in the MultiPoint2D value- Overrides:
doMultiPoint2DGetMinXTransformin classDBDefinition- Parameters:
first- the MultiPoint2D value- Returns:
- SQL
-
doMultiPoint2DGetMaxYTransform
public String doMultiPoint2DGetMaxYTransform(String first)
Description copied from class:DBDefinitionProvides the SQL that will derive the largest Y value of all the points in the MultiPoint2D value- Overrides:
doMultiPoint2DGetMaxYTransformin classDBDefinition- Parameters:
first- the MultiPoint2D value- Returns:
- SQL
-
doMultiPoint2DGetMaxXTransform
public String doMultiPoint2DGetMaxXTransform(String first)
Description copied from class:DBDefinitionProvides the SQL that will derive the largest X value of all the points in the MultiPoint2D value- Overrides:
doMultiPoint2DGetMaxXTransformin classDBDefinition- Parameters:
first- the MultiPoint2D value- Returns:
- SQL
-
getTrueValue
public String getTrueValue()
Description copied from class:DBDefinitionThe value used for TRUE boolean values.The default method returns " TRUE ".
- Overrides:
getTrueValuein classDBDefinition- Returns:
- " TRUE "
-
getFalseValue
public String getFalseValue()
Description copied from class:DBDefinitionThe value used for FALSE boolean values.The default method returns " FALSE ".
- Overrides:
getFalseValuein classDBDefinition- Returns:
- " FALSE "
-
preferredLargeObjectWriter
public LargeObjectHandlerType preferredLargeObjectWriter(DBLargeObject<?> lob)
- Overrides:
preferredLargeObjectWriterin classDBDefinition
-
preferredLargeObjectReader
public LargeObjectHandlerType preferredLargeObjectReader(DBLargeObject<?> lob)
- Overrides:
preferredLargeObjectReaderin classDBDefinition
-
getRoundUpFunctionName
public String getRoundUpFunctionName()
Return the function name for the RoundUp function.For MS SQLServer this method returns ceiling
Support DBvolution at Patreon
- Overrides:
getRoundUpFunctionNamein classDBDefinition- Returns:
- the name of the function to use when rounding numbers up
-
getNaturalLogFunctionName
public String getNaturalLogFunctionName()
Return the function name for the Natural Logarithm function.For SQLServer this method returns log
Support DBvolution at Patreon
- Overrides:
getNaturalLogFunctionNamein classDBDefinition- Returns:
- the name of the function to use when rounding numbers up
-
getLogBase10FunctionName
public String getLogBase10FunctionName()
Return the function name for the Logarithm Base10 function.By default this method returns log10
Support DBvolution at Patreon
- Overrides:
getLogBase10FunctionNamein classDBDefinition- Returns:
- the name of the function to use when rounding numbers up
-
doRandomNumberTransform
public String doRandomNumberTransform()
Returns the required code to generate a random number.For each call of this method a new random number is generated.
This method DOES NOT use the SQLServer built-in function as it does not produce a different result for different rows in a single query.
Support DBvolution at Patreon
- Overrides:
doRandomNumberTransformin classDBDefinition- Returns:
- random number generating code
-
doFindNumberInStringTransform
public String doFindNumberInStringTransform(String toSQLString)
- Overrides:
doFindNumberInStringTransformin classDBDefinition
-
doFindIntegerInStringTransform
public String doFindIntegerInStringTransform(String toSQLString)
- Overrides:
doFindIntegerInStringTransformin classDBDefinition
-
getInsertPreparation
public Collection<? extends String> getInsertPreparation(DBRow table)
- Overrides:
getInsertPreparationin classDBDefinition
-
getInsertCleanUp
public Collection<? extends String> getInsertCleanUp(DBRow table)
- Overrides:
getInsertCleanUpin classDBDefinition
-
getAlterTableAddColumnSQL
public String getAlterTableAddColumnSQL(DBRow existingTable, PropertyWrapper<?,?,?> columnPropertyWrapper)
- Overrides:
getAlterTableAddColumnSQLin classDBDefinition
-
supportsNullsOrderingStandard
public boolean supportsNullsOrderingStandard()
- Overrides:
supportsNullsOrderingStandardin classDBDefinition
-
doStringAccumulateTransform
public String doStringAccumulateTransform(String accumulateColumn, String separator, String referencedTable)
- Overrides:
doStringAccumulateTransformin classDBDefinition
-
doStringAccumulateTransform
public String doStringAccumulateTransform(String accumulateColumn, String separator, String orderByColumnName, String referencedTable)
- Overrides:
doStringAccumulateTransformin classDBDefinition
-
requiresClosedPolygons
public boolean requiresClosedPolygons()
- Overrides:
requiresClosedPolygonsin classDBDefinition
-
requiresOnClauseForAllJoins
public boolean requiresOnClauseForAllJoins()
- Overrides:
requiresOnClauseForAllJoinsin classDBDefinition
-
requiresReversingLineStringsFromDatabase
public boolean requiresReversingLineStringsFromDatabase()
- Overrides:
requiresReversingLineStringsFromDatabasein classDBDefinition
-
transformDatabaseLine2DValueToJTSLineString
public com.vividsolutions.jts.geom.LineString transformDatabaseLine2DValueToJTSLineString(String lineStringAsSQL) throws com.vividsolutions.jts.io.ParseException
Description copied from class:DBDefinitionFrom the database's representation of a Lin2D create a JTS LineString.This is the inverse of
DBDefinition.transformPolygonIntoDatabasePolygon2DFormat(com.vividsolutions.jts.geom.Polygon).- Overrides:
transformDatabaseLine2DValueToJTSLineStringin classDBDefinition- Parameters:
lineStringAsSQL- a line2d value- Returns:
- a linestring created from the line2d
- Throws:
com.vividsolutions.jts.io.ParseException- if the database result is not a valid WKT
-
getDefaultOrderingClause
public String getDefaultOrderingClause()
- Overrides:
getDefaultOrderingClausein classDBDefinition
-
supportsDurationNatively
public boolean supportsDurationNatively()
- Overrides:
supportsDurationNativelyin classDBDefinition
-
supportsDateRepeatDatatypeFunctions
public boolean supportsDateRepeatDatatypeFunctions()
- Overrides:
supportsDateRepeatDatatypeFunctionsin classDBDefinition
-
isDuplicateColumnException
public boolean isDuplicateColumnException(Exception exc)
- Overrides:
isDuplicateColumnExceptionin classDBDefinition
-
-