Spanish Total.js
English
Documentation For AI agents
Contents

Change, add and delete rows

Your changes wait in the grid until you read their SQL and save them together. Nothing reaches the database before that.

.md GitHub
On this page

Change a value

  1. Double-click it, or go to it and press Enter or F2.
  2. Write the new value, and press Change. The cell is marked.

You can also change the values of the selected row in the row on the side.

Each type has its own field:

TypeHow it is changed
Yes or noTrue, False or NULL
Dates and timesA calendar and a clock, and Now. The time zone of the value stays
JSONA text that is checked as you write, and Lay out to arrange it
UUIDA text, and New to make one
BinaryHexadecimal, as 0x0a1b
Lists of PostgreSQLAs the database writes them: {a,b,c}

Set NULL takes the value away, where the column allows it. An empty text is not the same as NULL.

Add a row

Press Row, fill in the fields and press Add. An empty field takes the default of its column, and needed marks those that have none. The new row does not show in the grid until you save: the line at the bottom counts it.

Delete a row

Select the row and press the bin, or choose Delete this row with the right button. The row is crossed out. Keep this row takes it back.

Save

  1. Press Save, which says how many changes wait.
  2. Read the statements.
  3. Press Save.

They run together: if one fails, none is kept. Each change must touch exactly one row. If someone deleted the row or changed its key in the meantime, nothing is saved, and TotalSQL shows the statement. If someone changed another value of the row, yours takes its place.

Discard forgets all the changes that wait.

Sorting, filtering, changing the page and reloading read the rows again, so TotalSQL asks before it loses the changes that wait. It also asks when you close the tab, the connection or the window, and when you quit from the menu.

When rows cannot be changed

The line at the bottom says why:

  • Rows have no primary key, so they are not edited here: TotalSQL needs a primary key, or a unique index on columns that are never NULL, to know which row to change. Use a query.
  • This connection is read-only: change its care level.
  • A view is read, not edited, here.

Columns filled by the database, such as a counter or a computed value, cannot be changed.

Made in Europe