.andPrepare("PRODUCTPRICE.CURRENCY",1)// TODO: warum ist Currency hardgecoded auf 1??
.andPrepare("PRODUCTPRICE.CURRENCY",1)// TODO: warum ist Currency hardgecoded auf 1?? --> Einheitliche Währungen einbauen (auch zeichen vor oder nach der zahel, etc.)
* @param {String} [alias=the current alias] the database alias where the condition shall be executed later (important for column types of preparedStatements)
* @example //TODO: add missing example
* @example
* see others/guide/HowToSqlConditionLib.adoc
*/
functionSqlCondition(alias){
//setting null is only needed to provide autocomplete for the ADITO-designer
//setting null is only needed to provide autocomplete for the ADITO-designer
this.preparedValues=null;
this._init();//the properties are initalized in an extra function because init is nearly the same as resetting (clearing) the SqlConditions
this._init();//the properties are initalized in an extra function because init is nearly the same as resetting (clearing) the SqlConditions
this.alias=alias;
this._cachedTypes={};
// save, if the last condition was an OR. For better bracket-placement
* please note that this function does not do any validation if it's possible to cast the expression's datatype you pass to the function in every supported DBMS
*
* @param {String} field name of the database field that shall be castet
* @param {String} [targetDatatype] a SQLTYPES-value of the following: SQLTYPES.CHAR, SQLTYPES.VARCHAR, SQLTYPES.INTEGER,
* SQLTYPES.DECIMAL, SQLTYPES.DATE
* @param {int|int[]} targetLength specifies the length of the target data type;
* <br/>- char/varchar: length
* <br/>- decimal: [length, decimals]
*
* @return {String} sql part to be included in sql-statements
*/
* masks the function cast of standard sql
* please note that this function does not do any validation if it's possible to cast the expression's datatype you pass to the function in every supported DBMS
*
* Problems:
* Derby has problems with casting to CHAR({> 254}) https://db.apache.org/derby/docs/10.14/ref/rrefsqlj13733.html
*
* @param {String} field name of the database field that shall be castet
* @param {String} [targetDatatype] a SQLTYPES-value of the following: SQLTYPES.CHAR, SQLTYPES.VARCHAR, SQLTYPES.INTEGER,
* SQLTYPES.DECIMAL, SQLTYPES.DATE
* @param {int|int[]} targetLength specifies the length of the target data type;
* <br/>- char/varchar: length
* <br/>- decimal: [length, decimals]
*
* @return {String} sql part to be included in sql-statements