fullstack-lang / gong

Gong (go+ng) is a go sub-language that compiles to go and angular. All valid go is valid gong and vice versa. Gong enables fast development of web applications. Gong is model centric and by default, a UML diagram editor of the model is embedded in each application.
MIT License
11 stars 1 forks source link

In the POST, UPDATE front operations, encode slices of pointers and decode at the back (even if targets are not yet synchronized). #438

Closed thomaspeugeot closed 10 months ago

thomaspeugeot commented 11 months ago

Steps

For instance, in the table stack:

table

the front shuffle the rows. One UPDATE of the table will be enough to update the back.

   const promises = []
    let index = 0
    for (let row of this.selectedTable?.Rows!) {
      row.RowPointersEncoding.Table_RowsDBID_Index.Int64 = index++
      promises.push(this.rowService.updateRow(row, this.DataStack))
    }

will be replaced with the table update

in the form,

the formFieldSelect.Value = optionwill be set automaticaly. No need for formFieldSelect.FormFieldSelectPointersEncoding.ValueID.Int64 = option.ID

svg


    this.svg.SVGPointersEncoding.StartRectID.Valid = true
    this.svg.SVGPointersEncoding.StartRectID.Int64 = startRectangleID

    this.svg.SVGPointersEncoding.EndRectID.Valid = true
    this.svg.SVGPointersEncoding.EndRectID.Int64 = endRectangleID

    this.svgService.updateSVG(this.svg, this.GONG__StackPath).subscribe(
      () => {

(to be investigated) When there is a full commit of the front, the back instances might not be synchronized yet, but the second stage of the commit will redeem with the correct pointers