Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -85,9 +85,9 @@ El tipo de valor del atributo depende del tipo [kind](DataClassClass.md#attribut
<!-- REF #EntityClass.clone().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|Result|4D.Entity|<-|New entity referencing the record
|Resultado|4D.Entity|<-|New entity referencing the record
|
</div>
<!-- END REF -->
Expand Down Expand Up @@ -453,9 +453,9 @@ Ejemplo con la opción `dk force drop if stamp changed`:
<!-- REF #EntityClass.first().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|Result|4D.Entity|<-|Reference to first entity of an entity selection (Null if not found)|
|Resultado|4D.Entity|<-|Reference to first entity of an entity selection (Null if not found)|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -854,9 +854,9 @@ La función `.isNew()` <!-- REF #EntityClass.isNew().Summary --> devuelve True s
<!-- REF #EntityClass.last().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|Result|4D.Entity|<-|Reference to last entity of an entity selection (Null if not found)|
|Resultado|4D.Entity|<-|Reference to last entity of an entity selection (Null if not found)|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -1007,9 +1007,9 @@ Ejemplo con la opción `dk reload if stamp changed`:
<!-- REF #EntityClass.next().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|Result|4D.Entity|<-|Reference to next entity in the entity selection (Null if not found)|
|Resultado|4D.Entity|<-|Reference to next entity in the entity selection (Null if not found)|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -1051,9 +1051,9 @@ Si no hay una entidad siguiente válida en la selección de entidades (es decir,
<!-- REF #EntityClass.previous().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|Result|4D.Entity|<-|Reference to previous entity in the entity selection (Null if not found)|
|Resultado|4D.Entity|<-|Reference to previous entity in the entity selection (Null if not found)|
</div>
<!-- END REF -->

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -291,11 +291,11 @@ Las llamadas a la función se pueden encadenar:
<!-- REF #EntitySelectionClass.and().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|entity |4D.Entity|->|Entity to intersect with|
|entitySelection |4D.EntitySelection|->|Entity selection to intersect with|
|Result|4D.EntitySelection|<-|New entity selection with the result of intersection with logical AND operator|
|entity|4D.Entity|->|Entidad con la que interceptar |
|entitySelection|4D.EntitySelection|->|Selección de entidad a interceptar|
|Resultado|4D.EntitySelection|<-|New entity selection with the result of intersection with logical AND operator|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -357,16 +357,16 @@ Queremos tener una selección de empleados llamados "Jones" que vivan en Nueva Y
<!-- REF #EntitySelectionClass.average().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|attributePath |Text|->|Attribute path to be used for calculation|
|Result|Real|<-|Arithmetic mean (average) of entity attribute values (Undefined if empty entity selection)|
|attributePath |Text|->|Ruta del atributo a utilizar para el cálculo|
|Resultado|Real|<-|Arithmetic mean (average) of entity attribute values (Undefined if empty entity selection)|
</div>
<!-- END REF -->

#### Descripción

La función `.average()` <!-- REF #EntitySelectionClass.average().Summary -->The `.average()` function<!-- END REF -->.
La función `.average()` <!-- REF #EntitySelectionClass.average().Summary -->devuelve la media aritmética (promedio) de todos los valores no nulos de *attributePath* en la selección de entidades<!-- END REF -->.

Pase en el parámetro *attributePath* la ruta del atributo a evaluar.

Expand Down Expand Up @@ -460,10 +460,10 @@ Si *entity* y la entity selection no pertenecen a la misma dataclass, se produce
<!-- REF #EntitySelectionClass.count().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|attributePath |Text|->|Path of the attribute to be used for calculation|
|Result|Real|<-|Number of non null *attributePath* values in the entity selection|
|attributePath |Text|->|Ruta del atributo a utilizar para el cálculo|
|Resultado|Real|<-|Number of non null *attributePath* values in the entity selection|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -508,10 +508,10 @@ Queremos averiguar el número total de empleados de una empresa sin contar a los
<!-- REF #EntitySelectionClass.copy().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|option |Integer|->|`ck shared`: return a shareable entity selection|
|Result|4D.EntitySelection|<-|Copy of the entity selection|
|option |Integer|->|`ck shared`: devuelve una selección de entidades compartible|
|Resultado|4D.EntitySelection|<-|Copy of the entity selection|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -574,17 +574,17 @@ A continuación, esta selección de entidades se actualiza con productos y se de
<!-- REF #EntitySelectionClass.distinct().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|attributePath|Text|->|Path of attribute whose distinct values you want to get|
|option|Integer|->|`dk diacritical`: diacritical evaluation ("A" # "a" for example)|
|Result|Collection|<-|Collection with only distinct values|
|attributePath|Text|->|Ruta del atributo cuyos valores distintos desea obtener|
|option|Integer|->|`dk diacritical`: evaluación diacrítica ("A" # "a" por ejemplo)|
|Resultado|Collection|<-|Collection with only distinct values|
</div>
<!-- END REF -->

#### Descripción

La función `.distinct()` <!-- REF #EntitySelectionClass.distinct().Summary -->The `.distinct()` function<!-- END REF -->.
La función `.distinct()` <!-- REF #EntitySelectionClass.distinct().Summary -->devuelve una colección que contiene sólo valores distintos (diferentes) del *attributePath* en la selección de entidades<!-- END REF -->.

La colección devuelta se clasifica automáticamente. Los valores **Null** no se devuelven.

Expand Down Expand Up @@ -638,10 +638,10 @@ $values:=ds.Employee.all().distinct("extra.nicknames[].first")
<!-- REF #EntitySelectionClass.drop().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|mode|Integer|->|`dk stop dropping on first error`: stops method execution on first non-droppable entity|
|Result|4D.EntitySelection|<-|Empty entity selection if successful, else entity selection containing non-droppable entity(ies)
|mode|Integer|->|`dk stop dropping on first error`: para la ejecución del método en la primera entidad no soltable|
|Resultado|4D.EntitySelection|<-|Empty entity selection if successful, else entity selection containing non-droppable entity(ies)
|
</div>
<!-- END REF -->
Expand Down Expand Up @@ -701,12 +701,12 @@ Ejemplo con la opción `dk stop dropping on first error`:
<!-- REF #EntitySelectionClass.extract().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|attributePath |Text|->|Attribute path whose values must be extracted to the new collection |
|targetPath|Text|->|Target attribute path or attribute name|
|option|Integer|->|`ck keep null`: include null attributes in the returned collection (ignored by default)|
|Result|Collection|<-|Collection containing extracted values|
|attributePath |Text|->|Ruta del atributo cuyos valores deben extraerse a la nueva colección |
|targetPath|Text|->|Ruta del atributo de destino o nombre del atributo|
|option|Integer||->|`ck keep null`: incluir atributos nulos en la colección devuelta (ignorado por defecto)|
|Resultado|Collection||<-|Collection containing extracted values|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -803,9 +803,9 @@ Dada la siguiente tabla y relación:
<!-- REF #EntitySelectionClass.first().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|Result|4D.Entity|<-|Reference to the first entity of the entity selection (Null if selection is empty)|
|Resultado|4D.Entity|<-|Reference to the first entity of the entity selection (Null if selection is empty)|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -868,7 +868,7 @@ Sin embargo, hay una diferencia entre ambas afirmaciones cuando la selección es

#### Descripción

La función `.isNew()` <!-- REF #EntitySelectionClass.getDataClass().Summary -->The `.getDataClass()` function<!-- END REF -->.
La función `.isNew()` <!-- REF #EntitySelectionClass.getDataClass().Summary -->devuelve la dataclass de la entity selection<!-- END REF -->.

Esta función es principalmente útil en el contexto del código genérico.

Expand Down Expand Up @@ -1085,10 +1085,10 @@ Las entity selections siempre tienen una propiedad `.length`.
<!-- REF #EntitySelectionClass.max().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|attributePath |Text|->|Path of the attribute to be used for calculation|
|Result|any|<-|Highest value of attribute|
|attributePath |Text|->|Ruta del atributo a utilizar para el cálculo|
|Resultado|any|<-|Highest value of attribute|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -1136,10 +1136,10 @@ Queremos encontrar el salario más alto entre todas las empleadas:
<!-- REF #EntitySelectionClass.min().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|attributePath |Text|->|Path of the attribute to be used for calculation|
|Result|any|<-|Lowest value of attribute|
|attributePath |Text|->|Ruta del atributo a utilizar para el cálculo|
|Resultado|any|<-|Lowest value of attribute|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -1518,13 +1518,13 @@ En este ejemplo, el campo objeto "marks" de la dataClass **Students** contiene l
<!-- REF #EntitySelectionClass.query().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|queryString |Text |-> |Search criteria as string|
|formula |Object |-> |Search criteria as formula object|
|value|any|->|Value(s) to use for indexed placeholder(s)|
|querySettings|Object|->|Query options: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan|
|Result|4D.EntitySelection|<-|New entity selection made up of entities from entity selection meeting the search criteria specified in *queryString* or *formula*|
|queryString |Text |-> |Criterios de búsqueda como cadena|
|formula |Object |-> |Criterios de búsqueda como objeto fórmula|
|value|any|->|Valor(es) a utilizar para marcador(es) de posición indexado(s)|
|querySettings|Object|->Opciones de consulta: parameters, attributes, args, allowFormulas, context, queryPath, queryPlan|
|Result|4D.EntitySelection<-|New entity selection made up of entities from entity selection meeting the search criteria specified in *queryString* or *formula*|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -1694,11 +1694,11 @@ En este ejemplo, el código clásico y el código ORDA modifican los mismos dato
<!-- REF #EntitySelectionClass.slice().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|startFrom |Integer |->|Index to start the operation at (included) |
|end |Integer|->|End index (not included)|
|Result|4D.EntitySelection|<-|New entity selection containing sliced entities (shallow copy)|
|startFrom |Integer |->|Índice para iniciar la operación (incluido) |
|end |Integer|->|Índice final (no incluido)|
|Resultado|4D.EntitySelection||<-|New entity selection containing sliced entities (shallow copy)|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -1756,10 +1756,10 @@ $slice:=ds.Employee.all().slice(-1;-2) //intenta devolver entidades del índice
<!-- REF #EntitySelectionClass.sum().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|attributePath |Text|->|Path of the attribute to be used for calculation|
|Result|Real|<-|Sum of entity selection values|
|attributePath |Text|->|Ruta del atributo a utilizar para el cálculo|
|Resultado|Real|<-|Sum of entity selection values|
</div>
<!-- END REF -->

Expand Down Expand Up @@ -1806,13 +1806,13 @@ $sum:=$sel.sum("salary")
<!-- REF #EntitySelectionClass.toCollection().Params -->
<div class="no-index">

|Parameter|Type||Description|
|Parámetro|Tipo||Descripción|
|---------|--- |:---:|------|
|filterString |Text|->|String with entity attribute path(s) to extract|
|filterCol |Collection|->|Collection of entity attribute path(s) to extract|
|options|Integer|->|`dk with primary key`: adds the primary key<br/>`dk with stamp`: adds the stamp|
|begin|Integer| ->|Designates the starting index|
|howMany|Integer|->|Number of entities to extract|
|filterString |Text|->|Cadena con ruta(s) de atributo(s) de entidad a extraer|
|filterCol |Collection|->|Colección de ruta(s) de atributo(s) de entidad a extraer|
|options|Integer||->|`dk with primary key`: añade la llave primaria<br/>`dk with stamp`: añade el sello|
|begin|Integer| ->|Designa el índice de inicio|
|howMany|Integer|->|Número de entidades a extraer|
|Result|Collection|<-|Collection of objects containing attributes and values of entity selection|
</div>
<!-- END REF -->
Expand Down
Loading