[pgadmin-hackers] [pgAdmin4][Patch][RM_2400]: Columns with defaults set to NULL whenremoving contents after pasting in the edit grid

Поиск
Список
Период
Сортировка
От Surinder Kumar
Тема [pgadmin-hackers] [pgAdmin4][Patch][RM_2400]: Columns with defaults set to NULL whenremoving contents after pasting in the edit grid
Дата
Msg-id CAM5-9D8JU4TXccq69qVyB7vbenOsDZ33agzg94caqr_jsfLeGw@mail.gmail.com
обсуждение исходный текст
Ответы Re: [pgadmin-hackers] [pgAdmin4][Patch][RM_2400]: Columns withdefaults set to NULL when removing contents after pasting in the edit grid  (Dave Page <dpage@pgadmin.org>)
Список pgadmin-hackers
Hi Dave,

Implementation:

1) Took a flag 'is_row_copied' for each copied row:

 - to distinguish it from add/update row.
 - to write code specific to copied row only as it requires different logic than add row.

2) After pasting an existing row:

 - If a user clear the cell value, it must set cell to [default] value if default value is explicitly given for column while creating table otherwise [null].

 - Again, if a user entered a value in same cell, then removes that value, set it to [null] (the same behaviour is for add row).

3) Took a 2-dimensional array "grid.copied_rows" to keep track the changes of each row's cell so that changes made to each cell are independent and removed once data is saved.

4) On pasting a row, the cell must be highlighted with light green colour, so triggers an addNewRow event. Now copied row will add to grid instead of re-rendering all rows again.

5) Moved the common logic into functions.

This patch pass the feature test cases and jasmine test case.
Also I will add the test cases for copy row and send an updated patch.

Please find attached patch and review.


Thanks,
Surinder Kumar



Вложения

В списке pgadmin-hackers по дате отправления:

Предыдущее
От: pgAdmin 4 Jenkins
Дата:
Сообщение: [pgadmin-hackers] Jenkins build is back to normal : pgadmin4-master-python27 #125
Следующее
От: Dave Page
Дата:
Сообщение: [pgadmin-hackers] pgAdmin 4 commit: Reverse engineer SQL for table-returning functionsco