Changeset: 8fa2da033f90 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/8fa2da033f90
Modified Files:
        sql/backends/monet5/sql.c
Branch: nested
Log Message:

adjust offset


diffs (29 lines):

diff --git a/sql/backends/monet5/sql.c b/sql/backends/monet5/sql.c
--- a/sql/backends/monet5/sql.c
+++ b/sql/backends/monet5/sql.c
@@ -5770,7 +5770,11 @@ insert_json_object(char **msg, JSON *js,
                                        }
                                }
                        }
-                       elm = insert_json_object(msg, js, bats, bat_offset, nr, 
elm, id, anr, t);
+                       if (bat_offset > old_bat_offset && old_bat_offset != 0) 
{
+                               elm = insert_json_object(msg, js, bats, 
bat_offset + 2, nr, elm, id, anr, t);
+                       } else {
+                               elm = insert_json_object(msg, js, bats, 
bat_offset, nr, elm, id, anr, t);
+                       }
                        break;
                case JSON_ARRAY:
                        /* TODO get id for nested array from the a global 
struct */
@@ -5785,7 +5789,11 @@ insert_json_object(char **msg, JSON *js,
                                        }
                                }
                        }
-                       elm = insert_json_array(msg, js, bats, bat_offset, nr, 
elm, id, anr, t);
+                       if (bat_offset > old_bat_offset && old_bat_offset != 0) 
{
+                               elm = insert_json_array(msg, js, bats, 
bat_offset + 2, nr, elm, id, anr, t);
+                       } else {
+                               elm = insert_json_array(msg, js, bats, 
bat_offset, nr, elm, id, anr, t);
+                       }
                        break;
                case JSON_ELEMENT: // field
                        name = jt->value;
_______________________________________________
checkin-list mailing list -- checkin-list@monetdb.org
To unsubscribe send an email to checkin-list-le...@monetdb.org

Reply via email to