Class SQLServerDBFunctionSymbolFactory
- java.lang.Object
-
- it.unibz.inf.ontop.model.term.functionsymbol.db.impl.AbstractDBFunctionSymbolFactory
-
- it.unibz.inf.ontop.model.term.functionsymbol.db.impl.AbstractSQLDBFunctionSymbolFactory
-
- it.unibz.inf.ontop.model.term.functionsymbol.db.impl.SQLServerDBFunctionSymbolFactory
-
- All Implemented Interfaces:
DBFunctionSymbolFactory
public class SQLServerDBFunctionSymbolFactory extends AbstractSQLDBFunctionSymbolFactory
-
-
Field Summary
-
Fields inherited from class it.unibz.inf.ontop.model.term.functionsymbol.db.impl.AbstractSQLDBFunctionSymbolFactory
ABS_STR, abstractRootDBType, abstractRootType, ADD_STR, AND_STR, CEIL_STR, CHAR_LENGTH_STR, COALESCE_STR, CONCAT_OP_STR, CONCAT_STR, CURRENT_TIMESTAMP_STR, dbBooleanType, dbDecimalType, dbDoubleType, dbIntegerType, dbStringType, dbTypeFactory, DIVIDE_STR, FLOOR_STR, LCASE_STR, LENGTH_STR, LOWER_STR, MULTIPLY_STR, NOT_STR, NULLIF_STR, OR_STR, RAND_STR, REGEXP_LIKE_STR, REGEXP_REPLACE_STR, REPLACE_STR, RIGHT_STR, ROUND_STR, ST_ASTEXT, ST_CONTAINS, ST_CONTAINSPROPERLY, ST_COVEREDBY, ST_COVERS, ST_CROSSES, ST_DISJOINT, ST_DISTANCE, ST_DISTANCE_SPHERE, ST_DISTANCE_SPHEROID, ST_EQUALS, ST_FLIP_COORDINATES, ST_GEOMFROMTEXT, ST_INTERSECTS, ST_MAKEPOINT, ST_OVERLAPS, ST_SETSRID, ST_TOUCHES, ST_TRANSFORM, ST_WITHIN, SUBSTR_STR, SUBSTRING_STR, SUBTRACT_STR, typeFactory, UCASE_STR, UPPER_STR
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected DBBooleanFunctionSymbolcreateBooleanCoalesceFunctionSymbol(int arity)protected Optional<DBFunctionSymbol>createCeilFunctionSymbol(DBTermType dbTermType)protected DBTypeConversionFunctionSymbolcreateDateTimeDenormFunctionSymbol(DBTermType timestampType)protected DBFunctionSymbolcreateDBAvg(DBTermType inputType, boolean isDistinct)protected DBBooleanFunctionSymbolcreateDBBooleanCase(int arity, boolean doOrderingMatter)protected DBBooleanFunctionSymbolcreateDBBooleanIfElseNull()DBConcatFunctionSymbolcreateDBConcatOperator(int arity)protected DBFunctionSymbolcreateDBGroupConcat(DBTermType dbStringType, boolean isDistinct)NB: SQL Server does not support (yet?) DISTINCT in STRING_AGG TODO: throw an exception?protected DBIsNullOrNotFunctionSymbolcreateDBIsNotNull(DBTermType dbBooleanType, DBTermType rootDBTermType)protected DBIsNullOrNotFunctionSymbolcreateDBIsNull(DBTermType dbBooleanType, DBTermType rootDBTermType)protected DBIsTrueFunctionSymbolcreateDBIsTrue(DBTermType dbBooleanType)protected it.unibz.inf.ontop.com.google.common.collect.ImmutableTable<DBTermType,RDFDatatype,DBTypeConversionFunctionSymbol>createNormalizationTable()protected DBConcatFunctionSymbolcreateNullRejectingDBConcat(int arity)Uses the operator + Assumes that the DB parameter CONCAT_NULL_YIELDS_NULL is ONprotected DBConcatFunctionSymbolcreateRegularDBConcat(int arity)Treats NULLs as empty stringsprotected Optional<DBFunctionSymbol>createRoundFunctionSymbol(DBTermType dbTermType)protected static it.unibz.inf.ontop.com.google.common.collect.ImmutableTable<String,Integer,DBFunctionSymbol>createSQLServerRegularFunctionTable(TypeFactory typeFactory)protected DBTypeConversionFunctionSymbolcreateStringToStringCastFunctionSymbol(DBTermType inputType, DBTermType targetType)Cast made explicit when the input type is ntext or text as «The data types text and varchar are incompatible in the equal to operator»protected DBFunctionSymbolcreateTzFunctionSymbol()TODO: use a different implementation of the FunctionSymbol for simplifying in the presence of DATETIME (has no TZ)DBFunctionSymbolgetDBCharLength()DBBooleanFunctionSymbolgetDBRegexpMatches2()TODO: updateDBBooleanFunctionSymbolgetDBRegexpMatches3()TODO: updateDBFunctionSymbolgetDBRegexpReplace3()TODO: try to support the fragment that reduces to REPLACEDBFunctionSymbolgetDBRegexpReplace4()DBFunctionSymbolgetDBSubString2()NonDeterministicDBFunctionSymbolgetDBUUID(UUID uuid)protected StringgetUUIDNameInDialect()protected voidinit()protected StringserializeContains(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeDateTimeNorm(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)Asks the timezone to be includedprotected StringserializeDay(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)By default, we assume that this function works both for TIMESTAMP and DATEprotected StringserializeDaysBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)We do not consider midnight as the threshold for an additional day but 24 hrsprotected StringserializeDBRowNumber(Function<ImmutableTerm,String> converter, TermFactory termFactory)ORDER BY is required in the OVER clauseprotected StringserializeHours(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeHoursBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeMD5(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeMillisBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeMinutes(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeMinutesBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeMonth(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)By default, we assume that this function works both for TIMESTAMP and DATEprotected StringserializeSeconds(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)TODO: is it returning an integer or a decimal?protected StringserializeSecondsBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeSHA1(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeSHA256(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeSHA512(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeStrAfter(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeStrBefore(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeSubString2(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)protected StringserializeTz(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)TODO: change strategy as it returns "00:00" when no timezone is specified instead of "" If done on the string, then we could make the CAST between DB timestamps implicit (DATEPART(TZ...) is not supported for DATETIME)protected StringserializeWeeksBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)Time extension - duration arithmeticprotected StringserializeYear(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)By default, we assume that this function works both for TIMESTAMP and DATE-
Methods inherited from class it.unibz.inf.ontop.model.term.functionsymbol.db.impl.AbstractSQLDBFunctionSymbolFactory
createAbsFunctionSymbol, createAddOperator, createBooleanDenormFunctionSymbol, createBooleanInequality, createBooleanNormFunctionSymbol, createCoalesceFunctionSymbol, createDateInequality, createDatetimeInequality, createDateTimeNormFunctionSymbol, createDatetimeToDatetimeCastFunctionSymbol, createDBAnd, createDBCase, createDBCount, createDBIfThenElse, createDBMax, createDBMin, createDBNotFunctionSymbol, createDBOr, createDBStrictEquality, createDBStrictNEquality, createDBSum, createDecimalToDecimalCastFunctionSymbol, createDecimalToStringCastFunctionSymbol, createDefaultCastToStringFunctionSymbol, createDefaultInequality, createDefaultRegularFunctionTable, createDivideOperator, createEncodeURLorIRI, createFloatDoubleToFloatDoubleCastFunctionSymbol, createFloatDoubleToStringCastFunctionSymbol, createFloorFunctionSymbol, createGeometryNormFunctionSymbol, createIntegerToIntegerCastFunctionSymbol, createIntegerToStringCastFunctionSymbol, createIsStringEmpty, createMultiplyOperator, createNonStrictDateEquality, createNonStrictDatetimeEquality, createNonStrictDefaultEquality, createNonStrictNumericEquality, createNonStrictStringEquality, createNumericInequality, createRegularBooleanFunctionSymbol, createRegularUntypedFunctionSymbol, createSimpleCastFunctionSymbol, createSimpleCastFunctionSymbol, createStringInequality, createSubtractOperator, createUntypedAddOperator, createUntypedDivideOperator, createUntypedMultiplyOperator, createUntypedSubtractOperator, getDBAnd, getDBAsText, getDBBoundary, getDBBuffer, getDBConcatOperator, getDBConvexHull, getDBDifference, getDBEnvelope, getDBGetSRID, getDBIfThenElse, getDBIntersection, getDBIsNotNull, getDBIsNull, getDBIsStringEmpty, getDBLower, getDBNow, getDBNullIf, getDBOr, getDBRand, getDBRelate, getDBRelateMatrix, getDBReplace, getDBRight, getDBSTContains, getDBSTContainsProperly, getDBSTCoveredBy, getDBSTCovers, getDBSTCrosses, getDBSTDisjoint, getDBSTDistance, getDBSTDistanceSphere, getDBSTDistanceSpheroid, getDBSTEquals, getDBSTFlipCoordinates, getDBSTGeomFromText, getDBSTIntersects, getDBSTMakePoint, getDBSTOverlaps, getDBSTSetSRID, getDBSTTouches, getDBSTTransform, getDBSTWithin, getDBSubString3, getDBSymDifference, getDBUnion, getDBUpper, getIsTrue, getNullRejectingDBConcat, getRandNameInDialect, isAnd, isCoalesce, isConcat, isOr, serializeDayFromDate, serializeDayFromDatetime, serializeDaysBetweenFromDate, serializeDaysBetweenFromDateTime, serializeMonthFromDate, serializeMonthFromDatetime, serializeWeeksBetweenFromDate, serializeWeeksBetweenFromDateTime, serializeYearFromDate, serializeYearFromDatetime
-
Methods inherited from class it.unibz.inf.ontop.model.term.functionsymbol.db.impl.AbstractDBFunctionSymbolFactory
canonicalizeRegularFunctionSymbolName, createContainsFunctionSymbol, createCurrentDateTimeFunctionSymbol, createDayFromDateFunctionSymbol, createDayFromDatetimeFunctionSymbol, createDaysBetweenFromDateFunctionSymbol, createDaysBetweenFromDateTimeFunctionSymbol, createDBBinaryMathOperator, createDBCountTable, createDBIriStringResolver, createDBRowNumber, createDBRowUniqueStr, createDenormalizationTable, createExtractFunctionSymbol, createFalseOrNullFunctionSymbol, createHoursBetweenFromDateTimeFunctionSymbol, createHoursFunctionSymbol, createLikeFunctionSymbol, createMD5FunctionSymbol, createMillisBetweenFromDateTimeFunctionSymbol, createMinutesBetweenFromDateTimeFunctionSymbol, createMinutesFunctionSymbol, createMonthFromDateFunctionSymbol, createMonthFromDatetimeFunctionSymbol, createRegularIfElseNull, createSecondsBetweenFromDateTimeFunctionSymbol, createSecondsFunctionSymbol, createSHA1FunctionSymbol, createSHA256FunctionSymbol, createSHA512FunctionSymbol, createSimilarToFunctionSymbol, createStrAfterFunctionSymbol, createStrBeforeFunctionSymbol, createStrEndsFunctionSymbol, createStrStartsFunctionSymbol, createTrueOrNullFunctionSymbol, createTypeNullFunctionSymbol, createUntypedDBBinaryMathOperator, createWeeksBetweenFromDateFunctionSymbol, createWeeksBetweenFromDateTimeFunctionSymbol, createYearFromDateFunctionSymbol, createYearFromDatetimeFunctionSymbol, getAbs, getBnodeStringTemplateFunctionSymbol, getCeil, getConversion2RDFLexicalFunctionSymbol, getConversionFromRDFLexical2DBFunctionSymbol, getCurrentDateTimeSymbol, getDBBooleanCase, getDBBooleanCoalesce, getDBBooleanIfElseNull, getDBBooleanInequality, getDBCase, getDBCastFunctionSymbol, getDBCastFunctionSymbol, getDBCoalesce, getDBContains, getDBCount, getDBDateInequality, getDBDatetimeInequality, getDBDayFromDate, getDBDayFromDatetime, getDBDaysBetweenFromDate, getDBDaysBetweenFromDateTime, getDBDefaultInequality, getDBEncodeForURI, getDBEndsWith, getDBHours, getDBHoursBetweenFromDateTime, getDBIfElseNull, getDBIntIndex, getDBIriStringResolver, getDBLike, getDBMathBinaryOperator, getDBMax, getDBMd5, getDBMillisBetweenFromDateTime, getDBMin, getDBMinutes, getDBMinutesBetweenFromDateTime, getDBMonthFromDate, getDBMonthFromDatetime, getDBNonStrictDateEquality, getDBNonStrictDatetimeEquality, getDBNonStrictDefaultEquality, getDBNonStrictNumericEquality, getDBNonStrictStringEquality, getDBNot, getDBNumericInequality, getDBRowNumber, getDBRowUniqueStr, getDBSeconds, getDBSecondsBetweenFromDateTime, getDBSha1, getDBSha256, getDBSha512, getDBSimilarTo, getDBStartsWith, getDBStrAfter, getDBStrBefore, getDBStrictEquality, getDBStrictNEquality, getDBStringInequality, getDBSum, getDBTz, getDBWeeksBetweenFromDate, getDBWeeksBetweenFromDateTime, getDBYearFromDate, getDBYearFromDatetime, getExtractFunctionSymbol, getFalseOrNullFunctionSymbol, getFloor, getFreshBnodeStringTemplateFunctionSymbol, getIRIStringTemplateFunctionSymbol, getNullIgnoringDBAvg, getNullIgnoringDBGroupConcat, getNullIgnoringDBSum, getR2RMLIRISafeEncode, getRegularDBBooleanFunctionSymbol, getRegularDBFunctionSymbol, getRound, getTemporaryConversionToDBStringFunctionSymbol, getTrueOrNullFunctionSymbol, getTypedNullFunctionSymbol, getUntypedDBMathBinaryOperator, serializeCurrentDateTime, serializeDBRowUniqueStr, serializeExtract
-
-
-
-
Method Detail
-
init
protected void init()
- Overrides:
initin classAbstractSQLDBFunctionSymbolFactory
-
createRegularDBConcat
protected DBConcatFunctionSymbol createRegularDBConcat(int arity)
Treats NULLs as empty strings- Specified by:
createRegularDBConcatin classAbstractSQLDBFunctionSymbolFactory
-
createDBIsNull
protected DBIsNullOrNotFunctionSymbol createDBIsNull(DBTermType dbBooleanType, DBTermType rootDBTermType)
- Overrides:
createDBIsNullin classAbstractSQLDBFunctionSymbolFactory
-
createDBIsNotNull
protected DBIsNullOrNotFunctionSymbol createDBIsNotNull(DBTermType dbBooleanType, DBTermType rootDBTermType)
- Overrides:
createDBIsNotNullin classAbstractSQLDBFunctionSymbolFactory
-
createNullRejectingDBConcat
protected DBConcatFunctionSymbol createNullRejectingDBConcat(int arity)
Uses the operator + Assumes that the DB parameter CONCAT_NULL_YIELDS_NULL is ON- Specified by:
createNullRejectingDBConcatin classAbstractSQLDBFunctionSymbolFactory
-
createNormalizationTable
protected it.unibz.inf.ontop.com.google.common.collect.ImmutableTable<DBTermType,RDFDatatype,DBTypeConversionFunctionSymbol> createNormalizationTable()
- Overrides:
createNormalizationTablein classAbstractDBFunctionSymbolFactory
-
createSQLServerRegularFunctionTable
protected static it.unibz.inf.ontop.com.google.common.collect.ImmutableTable<String,Integer,DBFunctionSymbol> createSQLServerRegularFunctionTable(TypeFactory typeFactory)
-
getDBCharLength
public DBFunctionSymbol getDBCharLength()
- Specified by:
getDBCharLengthin interfaceDBFunctionSymbolFactory- Overrides:
getDBCharLengthin classAbstractSQLDBFunctionSymbolFactory
-
getDBUUID
public NonDeterministicDBFunctionSymbol getDBUUID(UUID uuid)
- Specified by:
getDBUUIDin interfaceDBFunctionSymbolFactory- Overrides:
getDBUUIDin classAbstractSQLDBFunctionSymbolFactory
-
getUUIDNameInDialect
protected String getUUIDNameInDialect()
- Specified by:
getUUIDNameInDialectin classAbstractSQLDBFunctionSymbolFactory
-
serializeDBRowNumber
protected String serializeDBRowNumber(Function<ImmutableTerm,String> converter, TermFactory termFactory)
ORDER BY is required in the OVER clause- Overrides:
serializeDBRowNumberin classAbstractSQLDBFunctionSymbolFactory
-
getDBRegexpMatches2
public DBBooleanFunctionSymbol getDBRegexpMatches2()
TODO: update- Specified by:
getDBRegexpMatches2in interfaceDBFunctionSymbolFactory- Overrides:
getDBRegexpMatches2in classAbstractSQLDBFunctionSymbolFactory
-
getDBRegexpMatches3
public DBBooleanFunctionSymbol getDBRegexpMatches3()
TODO: update- Specified by:
getDBRegexpMatches3in interfaceDBFunctionSymbolFactory- Overrides:
getDBRegexpMatches3in classAbstractSQLDBFunctionSymbolFactory
-
createDBConcatOperator
public DBConcatFunctionSymbol createDBConcatOperator(int arity)
- Specified by:
createDBConcatOperatorin classAbstractSQLDBFunctionSymbolFactory
-
serializeContains
protected String serializeContains(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Specified by:
serializeContainsin classAbstractDBFunctionSymbolFactory
-
serializeStrBefore
protected String serializeStrBefore(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Specified by:
serializeStrBeforein classAbstractDBFunctionSymbolFactory
-
serializeStrAfter
protected String serializeStrAfter(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Specified by:
serializeStrAfterin classAbstractDBFunctionSymbolFactory
-
serializeMD5
protected String serializeMD5(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Specified by:
serializeMD5in classAbstractDBFunctionSymbolFactory
-
serializeSHA1
protected String serializeSHA1(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Specified by:
serializeSHA1in classAbstractDBFunctionSymbolFactory
-
serializeSHA256
protected String serializeSHA256(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Specified by:
serializeSHA256in classAbstractDBFunctionSymbolFactory
-
serializeSHA512
protected String serializeSHA512(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Specified by:
serializeSHA512in classAbstractDBFunctionSymbolFactory
-
createTzFunctionSymbol
protected DBFunctionSymbol createTzFunctionSymbol()
TODO: use a different implementation of the FunctionSymbol for simplifying in the presence of DATETIME (has no TZ)- Overrides:
createTzFunctionSymbolin classAbstractDBFunctionSymbolFactory
-
serializeTz
protected String serializeTz(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
TODO: change strategy as it returns "00:00" when no timezone is specified instead of "" If done on the string, then we could make the CAST between DB timestamps implicit (DATEPART(TZ...) is not supported for DATETIME)- Specified by:
serializeTzin classAbstractDBFunctionSymbolFactory
-
serializeDateTimeNorm
protected String serializeDateTimeNorm(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
Asks the timezone to be included- Specified by:
serializeDateTimeNormin classAbstractSQLDBFunctionSymbolFactory
-
createDBIsTrue
protected DBIsTrueFunctionSymbol createDBIsTrue(DBTermType dbBooleanType)
- Overrides:
createDBIsTruein classAbstractSQLDBFunctionSymbolFactory
-
createDBBooleanIfElseNull
protected DBBooleanFunctionSymbol createDBBooleanIfElseNull()
- Overrides:
createDBBooleanIfElseNullin classAbstractDBFunctionSymbolFactory
-
getDBRegexpReplace3
public DBFunctionSymbol getDBRegexpReplace3()
TODO: try to support the fragment that reduces to REPLACE- Specified by:
getDBRegexpReplace3in interfaceDBFunctionSymbolFactory- Overrides:
getDBRegexpReplace3in classAbstractSQLDBFunctionSymbolFactory
-
getDBRegexpReplace4
public DBFunctionSymbol getDBRegexpReplace4()
- Specified by:
getDBRegexpReplace4in interfaceDBFunctionSymbolFactory- Overrides:
getDBRegexpReplace4in classAbstractSQLDBFunctionSymbolFactory
-
createStringToStringCastFunctionSymbol
protected DBTypeConversionFunctionSymbol createStringToStringCastFunctionSymbol(DBTermType inputType, DBTermType targetType)
Cast made explicit when the input type is ntext or text as «The data types text and varchar are incompatible in the equal to operator»- Overrides:
createStringToStringCastFunctionSymbolin classAbstractSQLDBFunctionSymbolFactory
-
createDateTimeDenormFunctionSymbol
protected DBTypeConversionFunctionSymbol createDateTimeDenormFunctionSymbol(DBTermType timestampType)
- Overrides:
createDateTimeDenormFunctionSymbolin classAbstractSQLDBFunctionSymbolFactory
-
serializeYear
protected String serializeYear(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
Description copied from class:AbstractSQLDBFunctionSymbolFactoryBy default, we assume that this function works both for TIMESTAMP and DATE- Overrides:
serializeYearin classAbstractSQLDBFunctionSymbolFactory
-
serializeMonth
protected String serializeMonth(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
Description copied from class:AbstractSQLDBFunctionSymbolFactoryBy default, we assume that this function works both for TIMESTAMP and DATE- Overrides:
serializeMonthin classAbstractSQLDBFunctionSymbolFactory
-
serializeDay
protected String serializeDay(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
Description copied from class:AbstractSQLDBFunctionSymbolFactoryBy default, we assume that this function works both for TIMESTAMP and DATE- Overrides:
serializeDayin classAbstractSQLDBFunctionSymbolFactory
-
serializeHours
protected String serializeHours(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Overrides:
serializeHoursin classAbstractSQLDBFunctionSymbolFactory
-
serializeMinutes
protected String serializeMinutes(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Overrides:
serializeMinutesin classAbstractSQLDBFunctionSymbolFactory
-
serializeSeconds
protected String serializeSeconds(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
Description copied from class:AbstractSQLDBFunctionSymbolFactoryTODO: is it returning an integer or a decimal?- Overrides:
serializeSecondsin classAbstractSQLDBFunctionSymbolFactory
-
createRoundFunctionSymbol
protected Optional<DBFunctionSymbol> createRoundFunctionSymbol(DBTermType dbTermType)
- Overrides:
createRoundFunctionSymbolin classAbstractSQLDBFunctionSymbolFactory
-
createCeilFunctionSymbol
protected Optional<DBFunctionSymbol> createCeilFunctionSymbol(DBTermType dbTermType)
- Overrides:
createCeilFunctionSymbolin classAbstractSQLDBFunctionSymbolFactory
-
getDBSubString2
public DBFunctionSymbol getDBSubString2()
- Specified by:
getDBSubString2in interfaceDBFunctionSymbolFactory- Overrides:
getDBSubString2in classAbstractSQLDBFunctionSymbolFactory
-
createDBAvg
protected DBFunctionSymbol createDBAvg(DBTermType inputType, boolean isDistinct)
- Overrides:
createDBAvgin classAbstractSQLDBFunctionSymbolFactory
-
createDBGroupConcat
protected DBFunctionSymbol createDBGroupConcat(DBTermType dbStringType, boolean isDistinct)
NB: SQL Server does not support (yet?) DISTINCT in STRING_AGG TODO: throw an exception?- Overrides:
createDBGroupConcatin classAbstractDBFunctionSymbolFactory
-
createDBBooleanCase
protected DBBooleanFunctionSymbol createDBBooleanCase(int arity, boolean doOrderingMatter)
- Overrides:
createDBBooleanCasein classAbstractSQLDBFunctionSymbolFactory
-
createBooleanCoalesceFunctionSymbol
protected DBBooleanFunctionSymbol createBooleanCoalesceFunctionSymbol(int arity)
- Overrides:
createBooleanCoalesceFunctionSymbolin classAbstractSQLDBFunctionSymbolFactory
-
serializeSubString2
protected String serializeSubString2(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
-
serializeWeeksBetween
protected String serializeWeeksBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
Time extension - duration arithmetic- Overrides:
serializeWeeksBetweenin classAbstractSQLDBFunctionSymbolFactory
-
serializeDaysBetween
protected String serializeDaysBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
We do not consider midnight as the threshold for an additional day but 24 hrs- Overrides:
serializeDaysBetweenin classAbstractSQLDBFunctionSymbolFactory
-
serializeHoursBetween
protected String serializeHoursBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Overrides:
serializeHoursBetweenin classAbstractSQLDBFunctionSymbolFactory
-
serializeMinutesBetween
protected String serializeMinutesBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Overrides:
serializeMinutesBetweenin classAbstractSQLDBFunctionSymbolFactory
-
serializeSecondsBetween
protected String serializeSecondsBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Overrides:
serializeSecondsBetweenin classAbstractSQLDBFunctionSymbolFactory
-
serializeMillisBetween
protected String serializeMillisBetween(it.unibz.inf.ontop.com.google.common.collect.ImmutableList<? extends ImmutableTerm> terms, Function<ImmutableTerm,String> termConverter, TermFactory termFactory)
- Overrides:
serializeMillisBetweenin classAbstractSQLDBFunctionSymbolFactory
-
-