diff --git a/aliasDefinition/Data_alias/Data_alias.aod b/aliasDefinition/Data_alias/Data_alias.aod index 66cadb14b0f6e276373f609cfa9b01c99b26812e..b61203d40a2585337cecc8f9e588257c53a8d5c8 100644 --- a/aliasDefinition/Data_alias/Data_alias.aod +++ b/aliasDefinition/Data_alias/Data_alias.aod @@ -2131,194 +2131,6 @@ </entityFieldDb> </entityFields> </entityDb> - <entityDb> - <name>COUNTRYINFO</name> - <dbName></dbName> - <idColumn>ISO2</idColumn> - <idGeneratorType v="0" /> - <idGeneratorInterval v="1" /> - <title></title> - <description></description> - <auditSyncConfig> - <name>auditSyncConfig</name> - <auditMode v="0" /> - <syncActive v="false" /> - <syncComplete v="true" /> - <syncDirection v="1" /> - <syncIds></syncIds> - </auditSyncConfig> - <entityFields> - <entityFieldDb> - <name>FLAGICON</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="2004" /> - <size v="2147483647" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>ZIP_EXISTS</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="1" /> - <size v="1" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>EUROZONE</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="1" /> - <size v="1" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>ISO3</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="1" /> - <size v="3" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>CURRENCYCODE</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="1" /> - <size v="3" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>ISO2</name> - <dbName></dbName> - <primaryKey v="true" /> - <columnType v="1" /> - <size v="2" /> - <scale v="0" /> - <notNull v="true" /> - <isUnique v="true" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>CURRENCYNAME_DE</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="12" /> - <size v="50" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>DEFAULTLANGUAGE</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="12" /> - <size v="5" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>DIALPREFIX</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="1" /> - <size v="5" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>POBOXNAME</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="12" /> - <size v="30" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>EUMEMBER</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="1" /> - <size v="1" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>NAME_DE</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="12" /> - <size v="100" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - <entityFieldDb> - <name>ADDRFORMAT</name> - <dbName></dbName> - <primaryKey v="false" /> - <columnType v="12" /> - <size v="250" /> - <scale v="0" /> - <notNull v="false" /> - <isUnique v="false" /> - <index v="false" /> - <title></title> - <description></description> - </entityFieldDb> - </entityFields> - </entityDb> <entityDb> <name>OFFER</name> <dbName></dbName> @@ -3861,6 +3673,151 @@ </entityFieldDb> </entityFields> </entityDb> + <entityDb> + <name>SALESPROJECT_CLASSIFICATION</name> + <dbName></dbName> + <idColumn>SALESPROJECT_CLASSIFICATIONID</idColumn> + <idGeneratorType v="0" /> + <idGeneratorInterval v="1" /> + <title></title> + <description></description> + <auditSyncConfig> + <name>auditSyncConfig</name> + <auditMode v="0" /> + <syncActive v="false" /> + <syncComplete v="true" /> + <syncDirection v="1" /> + <syncIds></syncIds> + </auditSyncConfig> + <entityFields> + <entityFieldDb> + <name>DATE_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>KEYWORD</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>SALESPROJECT_CLASSIFICATIONID</name> + <dbName></dbName> + <primaryKey v="true" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="true" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>CLASS</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="1" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>DATE_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="93" /> + <size v="29" /> + <scale v="9" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_NEW</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>VALUE</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="4" /> + <size v="10" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>SALESPROJECT_ID</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="1" /> + <size v="36" /> + <scale v="0" /> + <notNull v="true" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + <entityFieldDb> + <name>USER_EDIT</name> + <dbName></dbName> + <primaryKey v="false" /> + <columnType v="12" /> + <size v="50" /> + <scale v="0" /> + <notNull v="false" /> + <isUnique v="false" /> + <index v="false" /> + <documentation></documentation> + <title></title> + <description></description> + </entityFieldDb> + </entityFields> + </entityDb> </entities> </entityGroup> </aliasDefDb> diff --git a/entity/Comm_entity/entityfields/relationsmaincountry_param/code.js b/entity/Comm_entity/entityfields/relationsmaincountry_param/code.js index 54f08b035b6f09b4b808e390719ac9b2c98ada31..7a2a8594ddcd6be9d498459b0413a1be88547fbc 100644 --- a/entity/Comm_entity/entityfields/relationsmaincountry_param/code.js +++ b/entity/Comm_entity/entityfields/relationsmaincountry_param/code.js @@ -8,6 +8,6 @@ cond = new SqlCondition(); cond.andPrepareVars("RELATION.RELATIONID", "$param.RelId_param"); //TODO: this should happen by 1:1 links instead of manually requesting the data by a select country = db.cell(cond.buildSelect("select ADDRESS.COUNTRY from ADDRESS " - + "join RELATION on RELATION.ADDRESS_ID = ADDRESS.ADDRESSID ")); + + "join RELATION on RELATION.ADDRESS_ID = ADDRESS.ADDRESSID ", "1 = 1")); if (country != "") result.string(country); \ No newline at end of file diff --git a/entity/History_entity/conditionProcess.js b/entity/History_entity/conditionProcess.js index f4f1d1b7f2d2f6d0aba42d913641f644657c5181..f98df46a0822d6518665993eae104760207a4d12 100644 --- a/entity/History_entity/conditionProcess.js +++ b/entity/History_entity/conditionProcess.js @@ -6,4 +6,4 @@ var cond = new SqlCondition(); cond.andPrepareVars("HISTORYLINK.ROW_ID", "$param.RowId_param"); //TODO: use a preparedCondition when available -result.string(db.translateCondition(cond.build())); \ No newline at end of file +result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file diff --git a/entity/Offer_entity/conditionProcess.js b/entity/Offer_entity/conditionProcess.js index f3c5610c26a702e1439268cc7239a62ef2393f55..7cab12160289270ffdc06a05fbcafde1151be07e 100644 --- a/entity/Offer_entity/conditionProcess.js +++ b/entity/Offer_entity/conditionProcess.js @@ -6,4 +6,4 @@ var cond = new SqlCondition(); cond.andPrepareVars("OFFER.SALESPROJECT_ID", "$param.SalesprojectId_param"); //TODO: use a preparedCondition when available -result.string(db.translateCondition(cond.build())); \ No newline at end of file +result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file diff --git a/entity/Pers_entity/conditionProcess.js b/entity/Pers_entity/conditionProcess.js index f1ac79e47dde01a71a6e2385a187c239a1889d2d..78fee76c103d7f1d46fd25357e66f7e6eac32fc8 100644 --- a/entity/Pers_entity/conditionProcess.js +++ b/entity/Pers_entity/conditionProcess.js @@ -7,4 +7,4 @@ cond.andPrepareVars("RELATION.ORG_ID", "$param.OrgId_param"); //TODO; add OBJECT_ID (probably another param) //TODO: use a preparedCondition when available -result.string(db.translateCondition(cond.build())); \ No newline at end of file +result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file diff --git a/entity/Pers_entity/entityfields/orgaddress_dfo/children/relid_param/code.js b/entity/Pers_entity/entityfields/orgaddress_dfo/children/relid_param/code.js index 802c305df653bd2fa19995186a932c38bdca9e51..047799d07d91f322efb2a73ddd25b284b20c625a 100644 --- a/entity/Pers_entity/entityfields/orgaddress_dfo/children/relid_param/code.js +++ b/entity/Pers_entity/entityfields/orgaddress_dfo/children/relid_param/code.js @@ -9,6 +9,6 @@ orgId = vars.get("$field.ORGID"); if (orgId){ cond = new SqlCondition(); cond.and("RELATION.PERS_ID is null").andPrepare("RELATION.ORG_ID", orgId) - orgRelId = db.cell(cond.buildSelect("select RELATION.RELATIONID from RELATION")); + orgRelId = db.cell(cond.buildSelect("select RELATION.RELATIONID from RELATION", "1 = 1")); result.string(orgRelId); } \ No newline at end of file diff --git a/entity/SalesprojectCompetition_entity/conditionProcess.js b/entity/SalesprojectCompetition_entity/conditionProcess.js index 1964cca453707c63447a05baa434780e4ffbd180..7211c893151bd82720da39955215dc913e23d244 100644 --- a/entity/SalesprojectCompetition_entity/conditionProcess.js +++ b/entity/SalesprojectCompetition_entity/conditionProcess.js @@ -6,4 +6,4 @@ var cond = new SqlCondition(); cond.andPrepareVars("SALESPROJECT_COMPETITION.SALESPROJECT_ID", "$param.SalesprojectId_param"); //TODO: use a preparedCondition when available -result.string(db.translateCondition(cond.build())); \ No newline at end of file +result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file diff --git a/entity/SalesprojectCycle_entity/conditionProcess.js b/entity/SalesprojectCycle_entity/conditionProcess.js index ad9aa8dfa41f288e0b90d0c9a4a0c7ed7892adea..46b431f0896e78b69e2825a2933904b08ca79929 100644 --- a/entity/SalesprojectCycle_entity/conditionProcess.js +++ b/entity/SalesprojectCycle_entity/conditionProcess.js @@ -6,4 +6,4 @@ var cond = new SqlCondition(); cond.andPrepareVars("SALESPROJECT_CYCLE.SALESPROJECT_ID", "$param.SalesprojectId_param"); //TODO: use a preparedCondition when available -result.string(db.translateCondition(cond.build())); \ No newline at end of file +result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file diff --git a/entity/SalesprojectForecast_entity/conditionProcess.js b/entity/SalesprojectForecast_entity/conditionProcess.js index 314018b82d93094534f30a39c32fe531bf771ea5..ab985582570e10b3e838ec36f7f0d225bc21f1d2 100644 --- a/entity/SalesprojectForecast_entity/conditionProcess.js +++ b/entity/SalesprojectForecast_entity/conditionProcess.js @@ -6,4 +6,4 @@ var cond = new SqlCondition(); cond.andPrepareVars("SALESPROJECT_FORECAST.SALESPROJECT_ID", "$param.SalesprojectId_param"); //TODO: use a preparedCondition when available -result.string(db.translateCondition(cond.build())); \ No newline at end of file +result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file diff --git a/entity/SalesprojectMember_entity/conditionProcess.js b/entity/SalesprojectMember_entity/conditionProcess.js index e4a53bd39191ef4e16b591700126da0b2c3f6c22..d7a57bbf3f47f3082a2b6db23040612a3224c94e 100644 --- a/entity/SalesprojectMember_entity/conditionProcess.js +++ b/entity/SalesprojectMember_entity/conditionProcess.js @@ -6,4 +6,4 @@ var cond = new SqlCondition(); cond.andPrepareVars("SALESPROJECT_MEMBER.SALESPROJECT_ID", "$param.SalesprojectId_param"); //TODO: use a preparedCondition when available -result.string(db.translateCondition(cond.build())); \ No newline at end of file +result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file diff --git a/entity/SalesprojectSource_entity/conditionProcess.js b/entity/SalesprojectSource_entity/conditionProcess.js index 2766d09d00e5afa2487296fe8d930e2d6885d186..e319b875ebe8be3ed307ad2d140029378eb3e4a0 100644 --- a/entity/SalesprojectSource_entity/conditionProcess.js +++ b/entity/SalesprojectSource_entity/conditionProcess.js @@ -6,4 +6,4 @@ var cond = new SqlCondition(); cond.andPrepareVars("SALESPROJECT_SOURCE.SALESPROJECT_ID", "$param.SalesprojectId_param"); //TODO: use a preparedCondition when available -result.string(db.translateCondition(cond.build())); \ No newline at end of file +result.string(db.translateCondition(cond.build("1 = 1"))); \ No newline at end of file diff --git a/entity/Salesproject_entity/entityfields/projectcode/onValidation.js b/entity/Salesproject_entity/entityfields/projectcode/onValidation.js index b880f9dc7f6436f6fc55de4c4216f391703449ed..811153527dd222121625672a171eb95cb835a990 100644 --- a/entity/Salesproject_entity/entityfields/projectcode/onValidation.js +++ b/entity/Salesproject_entity/entityfields/projectcode/onValidation.js @@ -9,5 +9,5 @@ var SalesprojectUtils = new SalesprojectUtils(); if( vars.get("$sys.operatingstate") == neon.OPERATINGSTATE_NEW && !SalesprojectUtils.validateProjectNumber(ProcessHandlingUtil.getOnValidationValue(vars.get("$field.PROJECTCODE"))) ) { - vars.set( "$field.PROJECTCODE", SalesprojectUtils.getNextProjectNumber().toString() ); + vars.set( "$field.PROJECTCODE", SalesprojectUtils.getNextProjectNumber().toString("1 = 1") ); } \ No newline at end of file diff --git a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod index bb8def2741701cec0837496df47408b5dbae2eaf..c76111f80df1ec30b3d1af7b420a6abcd72f44ce 100644 --- a/language/_____LANGUAGE_de/_____LANGUAGE_de.aod +++ b/language/_____LANGUAGE_de/_____LANGUAGE_de.aod @@ -989,6 +989,7 @@ </entry> <entry> <key>Deliver opinion</key> + <value>Stellungnahme abgeben</value> </entry> <entry> <key>Presentation follow-up</key> diff --git a/others/db_changes/masterChangelog.xml b/others/db_changes/masterChangelog.xml index 4ce4d0a862c8e0887831e5caf4072785a85c352e..f838fc14cc310a81cbedc2e8e4c8f4e86469c95e 100644 --- a/others/db_changes/masterChangelog.xml +++ b/others/db_changes/masterChangelog.xml @@ -14,6 +14,12 @@ <include file="struct/create_productprice.xml"/> <include file="struct/create_stock.xml"/> <include file="struct/create_salesproject.xml"/> + <include file="struct/create_salesproject_classification.xml"/> + <include file="struct/create_salesproject_competition.xml"/> + <include file="struct/create_salesproject_cycle.xml"/> + <include file="struct/create_salesproject_forecast.xml"/> + <include file="struct/create_salesproject_member.xml"/> + <include file="struct/create_salesproject_source.xml"/> <include file="struct/create_offer.xml"/> <include file="struct/create_offeritem.xml"/> <include file="struct/contractChanges.xml"/> diff --git a/process/Sql_lib/process.js b/process/Sql_lib/process.js index dba1eccba0d640782205f0e7eb1c1d452d6d9741..5652eed7555ae933f12c23b006ee132381e4a02c 100644 --- a/process/Sql_lib/process.js +++ b/process/Sql_lib/process.js @@ -38,9 +38,8 @@ SqlCondition.prototype.and = function(cond){ * same as the "and"-function but with preparedStatement functionality * @param {String} field the database field as "tablename.columnname"; e.g. "ORG.NAME" * @param {String} value the value that shall be set into the prepared statement - * @param {String} cond opt the strucutre of the SQL condition as preparedString, you can use a number sign "#" as placeholder for you fieldname; + * @param {String} [cond="# = ?"] the strucutre of the SQL condition as preparedString, you can use a number sign "#" as placeholder for you fieldname; * e.g. "# > ?"; escaping the number sign is possible with a backslash "\" - * Default is "# = ?" * @param {Numeric} [fieldType] SQL-column-type; if the fieldType is not given it's loaded automatically; * please note that this can be a performace issue if it happens a lot of times (e.g. in aloop) * @return {Object} current SqlCondition-object @@ -69,9 +68,8 @@ SqlCondition.prototype.or = function(cond){ * same as the "or"-function but with preparedStatement functionality * @param {String} field the database field as "tablename.columnname"; e.g. "ORG.NAME" * @param {String} value the value that shall be set into the prepared statement - * @param {String} cond the strucutre of the SQL condition as preparedString, you can use a number sign "#" as placeholder for you fieldname; + * @param {String} [cond="# = ?"] the strucutre of the SQL condition as preparedString, you can use a number sign "#" as placeholder for you fieldname; * e.g. "# > ?"; escaping the number sign is possible with a backslash "\" - * Default is "# = ?" * @param {Numeric} [fieldType] SQL-column-type; if the fieldType is not given it's loaded automatically; * please note that this can be a performace issue if it happens a lot of times (e.g. in aloop) * @return {Object} current SqlCondition-object @@ -85,9 +83,8 @@ SqlCondition.prototype.orPrepare = function(field, value, cond, fieldType){ * same as the "andPrepare"-function but with validation of adito-variables functionality * @param {String} field the database field as "tablename.columnname"; e.g. "ORG.NAME" * @param {String} variable the adito-variable that shall be set into the prepared statement - * @param {String} cond opt the strucutre of the SQL condition as preparedString, you can use a number sign "#" as placeholder for you fieldname; + * @param {String} [cond = "# = ?" ] the strucutre of the SQL condition as preparedString, you can use a number sign "#" as placeholder for you fieldname; * e.g. "# > ?"; escaping the number sign is possible with a backslash "\" - * Default is "# = ?" * @param {Numeric} [fieldType] SQL-column-type; if the fieldType is not given it's loaded automatically; * please note that this can be a performace issue if it happens a lot of times (e.g. in aloop) * @return {Object} current SqlCondition-object @@ -104,9 +101,8 @@ SqlCondition.prototype.andPrepareVars = function(field, variable, cond, fieldTyp * same as the "orPrepare"-function but with validation of adito-variables functionality * @param {String} field the database field as "tablename.columnname"; e.g. "ORG.NAME" * @param {String} variable the adito-variable that shall be set into the prepared statement - * @param {String} cond opt the strucutre of the SQL condition as preparedString, you can use a number sign "#" as placeholder for you fieldname; + * @param {String} [cond="# = ?"] the strucutre of the SQL condition as preparedString, you can use a number sign "#" as placeholder for you fieldname; * e.g. "# > ?"; escaping the number sign is possible with a backslash "\" - * Default is "# = ?" * @param {Numeric} [fieldType] SQL-column-type; if the fieldType is not given it's loaded automatically; * please note that this can be a performace issue if it happens a lot of times (e.g. in aloop) * @return {Object} current SqlCondition-object @@ -121,12 +117,10 @@ SqlCondition.prototype.orPrepareVars = function(field, variable, cond, fieldType /** * ready to use string; does not contain a where keyword at the beginning - * @param {String} alternativeCond opt condition that is returned when nothing has been appended. Default is "1 = 1". + * @param {String} [alternativeCond=""] condition that is returned when nothing has been appended. * @return {String} concatenated SQL-condition; empty string if nothing has been appended or - if passed - the alternativeCond */ SqlCondition.prototype.toString = function(alternativeCond){ - if (alternativeCond == undefined) { alternativeCond = "1 = 1" } - if (!this._sqlStorage && alternativeCond) return alternativeCond else @@ -135,7 +129,7 @@ SqlCondition.prototype.toString = function(alternativeCond){ /** * ready to use string; does contain a where keyword at the beginning - * @param {String} alternativeCond opt condition that is returned when nothing has been appended. Default is "1 = 1". + * @param {String} [alternativeCond=""] condition that is returned when nothing has been appended. * @return {String} concatenated SQL-condition; empty string if nothing has been appended or - if passed - the alternativeCond */ SqlCondition.prototype.toWhereString = function(alternativeCond){ @@ -148,7 +142,7 @@ SqlCondition.prototype.toWhereString = function(alternativeCond){ /** * ready to use prepared condition; does not contain a where keyword at the beginning - * @param {String} alternativeCond opt Condition that is returned when nothing has been appended. Default is "1 = 1". + * @param {String} [alternativeCond=""] Condition that is returned when nothing has been appended. * @return {Array[][][]} Prepared condition with [condition, [[field1, type1], [field2, type2]]] */ SqlCondition.prototype.build = function(alternativeCond){ @@ -158,11 +152,11 @@ SqlCondition.prototype.build = function(alternativeCond){ /** * ready to use prepared select * @param {String} beforeCondition Part of the sql before the condition without where (e.g. "select FIRSTNAME from PERS") - * @param {String} alternativeCond opt Condition that is returned when nothing has been appended. Default is "1 = 1". - * @param {String} afterCondition opt Part of the sql after the condition (e.g. "order by FIRSTNAME"). Default is "". + * @param {String} [alternativeCond=""] Condition that is returned when nothing has been appended. + * @param {String} [afterCondition=""] Part of the sql after the condition (e.g. "order by FIRSTNAME"). * @return {Array[][][]} Prepared condition with [condition, [[field1, type1], [field2, type2]]] */ -SqlCondition.prototype.buildSelect = function(beforeCondition, alternativeCond, afterCondition){ +SqlCondition.prototype.buildSelect = function(beforeCondition, alternativeCond, afterCondition) { if (afterCondition == undefined) { afterCondition = "" }; return [beforeCondition + " " + cond.toWhereString(alternativeCond) + " " + afterCondition, cond.preparedValues]; }