diff --git a/others/guide/HowToDataLib.adoc b/others/guide/HowToDataLib.adoc index b331b7eb20e5498b7591e27f8bf1c4fdb4a16aba..f16c4f8b74628f20c0a95c2799a747a8e7eb6cf0 100644 --- a/others/guide/HowToDataLib.adoc +++ b/others/guide/HowToDataLib.adoc @@ -36,7 +36,7 @@ var myDescriptiveNameOfTheTree = new DataTree(alias); // or var myDescriptiveNameOfTheTree = DataTree.begin(alias); ---- -* use the object, add conditions +* use the object, add conditions with add(uid, parent, itemArray) [source,javascript] ---- var myTree = myDescriptiveNameOfTheTree.add("1", "myRoot", ["itemId1", "value"]) @@ -44,7 +44,7 @@ var myTree = myDescriptiveNameOfTheTree.add("1", "myRoot", ["itemId1", "value"]) .add("3", "2", ["itemId3", "value"]) .add("4", "2", ["itemId4", "value"]) .add("5", "4", ["itemId5", "value"]) - .add("5", "3", ["itemId5", "value"]) // Now you added id "5" a seccond time. + .add("5", "3", ["itemId5", "value"]) // Now you added id "5" a second time, overrides previous entry with id 5 .getTreeObject(); var myArray = myDescriptiveNameOfTheTree.toArray(); @@ -92,7 +92,7 @@ var myTree = myDescriptiveName.add("1", "myRoot", ["itemId1", "value"]) Note that if you add an item two times, only the data-array of the second item is used! It will overwrite the data from the first one! == When to use which == -If you only need a array with parent - child - structure e.g. for the treetable or charts, use +If you only need an array with parent - child - structure e.g. for the treetable or charts, use ReferencingData If you need a tree object for your logic, use DataTree. \ No newline at end of file diff --git a/others/guide/HowToSqlConditionLib.adoc b/others/guide/HowToSqlConditionLib.adoc index 82f29b1b846b875aee80c5eaa7052726dd50c010..51e953b5a3c983c2ce0a3ac82c36f998d48e95ce 100644 --- a/others/guide/HowToSqlConditionLib.adoc +++ b/others/guide/HowToSqlConditionLib.adoc @@ -29,8 +29,8 @@ var myDescriptiveNameOfTheCondition = SqlCondition.begin(alias); * use the object, add conditions [source,javascript] ---- -myDescriptiveNameOfTheCondition.orPrepare("PERSON.FIRSTNAME", "Bob") - .orPrepare("PERSON.LASTNAME", "Meier"); +myDescriptiveNameOfTheCondition.orPrepare("PERSON.FIRSTNAME", "Bob") + .orPrepare("PERSON.LASTNAME", "Meier"); // orPrepare explained in "available methods" below ---- * You can also use table aliases, if you provide the table, column and alias as array. The table name has to be provided for loading the data types but the alias is built into the sql. @@ -82,11 +82,11 @@ The field name needs to be given with Or if you use only COLUMNNAME, you have to provide the fieldType. But keep in mind: Other than the original adito db. functions this lib caches the field types automatically (for the livetime of an SqlCondition Object). -So most times it is save to use the first method. Even in loops or if you use the same Column several times. +So most times it is save to use the first method. Even in loops or if you use the same column several times. [source,javascript] ---- -myDescriptiveNameOfTheCondition.orPrepared("PERSON.FIRSTNAME", 'Bob', "#<?"); +myDescriptiveNameOfTheCondition.orPrepared("PERSON.FIRSTNAME", 'Bob', "#<?"); // #(field) < ?(value) ---- === andPreparedVars / orPreparedVars === @@ -126,7 +126,7 @@ var myConditionSql = myDescriptiveNameOfTheCondition.toWhereString("1=0"); ---- === preparedValues === -This is no method but a membervariable. +This is no method but a member variable. It contains the array with the prepared values. [source,javascript] diff --git a/others/guide/ProviderConsumerParameter.adoc b/others/guide/ProviderConsumerParameter.adoc index 67b427e998091baebd9d482c2de581b3d20d2dea..ee9ff59bc7d051dc069cd0ba1a409887036f8f8c 100644 --- a/others/guide/ProviderConsumerParameter.adoc +++ b/others/guide/ProviderConsumerParameter.adoc @@ -25,7 +25,7 @@ If you connect to *EmailCommunications* you get *only the Email* communication t If you connect to *PhoneCommunications* you get *only the Phone* communication type of a contact. *Important:* -*Do not always create a new provider when connecting a new entity. Maybe u can use an already existing provider.* +*Do not always create a new provider when connecting a new entity. Maybe you can use an already existing provider.* *Try to reuse providers if you need similar data for two dependencies* === Consumer === diff --git a/others/guide/TargetContext.adoc b/others/guide/TargetContext.adoc index 89155b20aa2879693555d901cf1f6f5445f002ab..1d466a0da9c53953491cf301711f745d6d8478e4 100644 --- a/others/guide/TargetContext.adoc +++ b/others/guide/TargetContext.adoc @@ -16,4 +16,4 @@ It is configured by two properties of the providers. * targetContextField * targetIdField -You can provide an entity-field for each of them which contain the contextId (currently the contextName 13.02.2019) and the rowId (UID) which should be used to open the preview or main view. \ No newline at end of file +You can provide an entity-field for each of them which contains the contextId (currently the contextName 13.02.2019) and the rowId (UID) which should be used to open the preview or main view. \ No newline at end of file diff --git a/others/guide/how to write JDito code.adoc b/others/guide/how to write JDito code.adoc index cd6e8b4d635476ced35c0911c5ce7dff43b6e02e..e8ab96aef63360b0994d45cb45de3fd07b45230a 100644 --- a/others/guide/how to write JDito code.adoc +++ b/others/guide/how to write JDito code.adoc @@ -1,4 +1,3 @@ -How to write JDito code ======================= :toc2: left :numbered: @@ -115,7 +114,7 @@ function SqlCondition(pAlias) <4> { //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 initialized in an extra function because init is nearly the same as resetting (clearing) the SqlConditions this.alias = alias; } /** @@ -142,12 +141,12 @@ So just start your functions / methods name with a _ if you need private methods --> do not use functions which start with a _ outside of the class! -Add @ignore to the comment of the private functions. +Add @ignore to the comment of those functions to prevent showing them in the generated jsdoc. == JS-Doc == <1> JS-Doc comment: http://usejsdoc.org/ -<2> jsdoc-blocks have to start with /** because the tool to generate docs out of jsdoc only works with /** +<2> jsdoc-blocks have to start with /** otherwise JSDoc cannot generate a documentation <3> use the correct form for optional/required parameters: http://usejsdoc.org/tags-param.html Optional parameter: [alias=the current alias] Required parameter: alias @@ -167,10 +166,9 @@ function SqlCondition(pAlias) ... } ---- -<3> examples are useful on more complex functions -<4> constructor function; init properties (do not set functions ("methods") here!) -<5> add functions ("methods") to the prototype, they are available through the prototype chain -<6> the comments have to start with /** not /* otherwise JSDoc cannot generate a documentation +<4> examples are useful on more complex functions +<5> constructor function; init properties (do not set functions ("methods") here!) +<6> add functions ("methods") to the prototype, they are available through the prototype chain And how to use it (normally you'd want to use preparedStatements but for the sake of an easy example it's a bit shorter here) See also HowToSqlConditionLib.adoc for a full documentation. diff --git a/others/guide/whichDatatype.adoc b/others/guide/whichDatatype.adoc index 391d8709372ab4cfddd037ec2cfb0a60e244a571..092ae1bf6ae5c02d56ced4bf133b5e956a8f23e2 100644 --- a/others/guide/whichDatatype.adoc +++ b/others/guide/whichDatatype.adoc @@ -17,7 +17,7 @@ TINYINT Add nullable="false" constraint, because for boolean null makes no sense and complicates searches and validations. == Text == -Text should be saved as Unicode. For this prefix the datatype with a 'N' (there are some exceptions lik the UUID) +Text should be saved as Unicode. For this prefix the datatype with a 'N' (there are some exceptions like the UUID) === Big text === For informations, descriptions, ...