Repository navigation
feat(rows): read rows as objects on api/2 with ?shape=object - #65
rjzondervan wants to merge 90 commits into
Conversation
An application receives its tables and views as a list of nodes. Add ContextNodeInputSet and ContextNodeInput to turn that request parameter into a normalised list. It has to be a list of objects whose id, type, permissions and order are integers, or strings of digits as form encoded requests send them, within the range of the 32-bit columns they are stored in. Missing permissions default to read. Anything else is rejected with an InvalidArgumentException instead of being cast. Nothing uses the value objects yet. Refs: nextcloud#3262 Assisted-by: ClaudeCode:claude-fable-5-2 Assisted-by: Codex:gpt-6.1-sol Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
PUT /api/2/contexts/{contextId} passed its nodes parameter to the
service nearly unchecked. A new node without permissions, a node that
is kept without permissions, or an object in place of the list made the
request fail with a 500, in part after earlier changes of the same
request were written.
Parse the nodes into a ContextNodeInputSet before the service is
called. Missing permissions now default to read, as they do when an
application is created, and that includes the nodes that are kept.
Nodes that are not a list, or that carry values other than integers,
are answered with a 400 before anything is written.
A JSON object whose keys count up from zero cannot be told apart from
a list once the request body is decoded, so it is still accepted.
Refs: nextcloud#3262
Assisted-by: ClaudeCode:claude-fable-5-2
Assisted-by: Codex:gpt-6.1-sol
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
POST /api/2/contexts shared its node handling with the update endpoint. A node without an id or type was answered with a 500, although the endpoint documents a 400 for invalid parameters, and other values were cast to integers without a check. Use the same ContextNodeInputSet as the update endpoint and drop sanitizeInputNodes(), which has no caller left. Creating an application is therefore stricter as well. Nodes given as an object rather than a list, floats, booleans or arrays in place of an integer, negative values and values beyond the 32-bit range were accepted so far and are now answered with a 400. Refs: nextcloud#3262 Assisted-by: ClaudeCode:claude-fable-5-2 Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
The nodes parameter of PUT /api/2/contexts/{contextId} was documented
as a single object with four required properties. The endpoint takes a
list of nodes, in which permissions and order are optional.
Regenerate openapi.json and the TypeScript types.
Refs: nextcloud#3262
Assisted-by: ClaudeCode:claude-fable-5-2
Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
An application update set the permissions of a node it kept to read when the request did not state them, although they are optional. A client that only reorders the nodes would thereby remove the write permissions of every node. Leave missing permissions out of ContextNodeInput and let the service decide: a node that is kept keeps its permissions, a node that is added gets read. Creating an application is unchanged, as the service already defaults missing permissions to read there. The scheme import calls the same update, so a node without permissions in an imported scheme follows these rules as well. It made the import fail before. Refs: nextcloud#3262 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
The permissions of a node were accepted as any integer within the range of the 32-bit column. Read is the base permission of a node in an application. The dialogs always grant it and only let create, update and delete be added on top, and without read the people the application is shared with cannot see the data of a node it lists. Bits beyond manage are not read anywhere. Accept only a bitmask of read, create, update, delete and manage that includes read, and answer other values with a 400. Manage stays allowed, as the permission checks honour it for applications. The scheme import and the user migration import do not pass through ContextNodeInput and are not covered by this check. Refs: nextcloud#3262 Assisted-by: ClaudeCode:claude-opus-5-5 Assisted-by: ClaudeCode:claude-fable-5-2 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
…the application After a delete, the dialog reset itself from the application it had just removed and read its sharing settings, which threw a TypeError. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ruben van der Linde <ruben@conduction.nl>
Invalid node permissions were answered with "Unexpected node permissions", which does not say what is expected. Nodes stored before the rule may lack read, so a client that sends back the permissions it read gets this 400. Name the rule in the message instead: the permissions must include read (1) and may only combine 1, 2, 4, 8 and 16. Refs: nextcloud#3262 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Jiajun Xu <foolfitz@gmail.com>
The single-row and listing routes return, with shape=object, one flat object per row keyed by the technical names of the columns, with the metadata in an @self block whose id is the row uuid. Datetimes carry the offset of the instance's default_timezone, links are {title, url, providerId} and relations are the uuid of the target row. The cells shape stays the default. Refs nextcloud#3096 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES (Strict) — self-review posted as COMMENT (GitHub blocks a verdict on your own PR)
Status: all 11 findings are addressed in 245f4e92, b302685b and ff1ce2d3 (10 fixed, the type of the object's keys kept by decision, see its thread); all threads are resolved. phpunit 721/721, Behat
@rows13/13. A re-review decides the verdict.
No blockers, but 4 concerns, and under Strict a 🟡 blocks. The object shape is read-only here and the routes keep their existing permission checks; the concerns are about what the object promises: a key for every column,
@selftimes that #63's filters can take back, relation uuids, and@selfthat a column can never replace. The fixes follow as new commits on this branch.
🟡 Concerns
- Columns without a stored cell are missing from the object
- @self timestamps use the instance offset, but the filter reads them as UTC
- Relations fall back to an int, contradicting 'relations are uuids'
- A column can overwrite @self
🟢 Minor
- No wired integration test for shape=object
- testCellsShapeIsTheDefault passes 'cells' explicitly
- Non-existent local times shift on read
- RowObject value type includes RowSelf for every key
- Unknown datetime format logs a warning per cell per request
- Columns are queried twice per request
- @self says lastEdit*, the filter and sort say updated*
✅ Verified clean
-
Both routes keep
RequirePermission(READ)and the service checks; on a view only the view's columns reach the object. -
Relation uuids expose nothing new: the cells shape already returns the target row id, and a uuid gives no access by itself.
-
findUuidsByIdsreads in chunks ofDB_CHUNK_SIZE, skips rows without a uuid and is tested against the database. -
An unknown
shapeis a 400 on both routes; federated tables and views are refused before serializing. -
Date-only and time-only columns stay naive; empty cells become
null. -
Scope: the single commit
32e3676a(14 files, +894/−10) againstreview-base/3096(#63's head). -
Checks on this head: phpunit 714/714, psalm, cs and rector clean, openapi up to date. Gates: the runner is not available for this repo, so the repo's own checks stand in. CI was still queued.
-
Live on the dev instance: an object only has keys for the cells that were stored (thread).
-
Connected issues: nextcloud#3096 (open; part 1 of 2,
Refs); depends on nextcloud#3095 (#63) and nextcloud#3093, both open.
🤖 Generated with Claude Code
- Every column a row is read with gets a property, null when the row has no cell for it. Row2 now carries the columns of its alias payload, narrowed by fields and view like the payload itself, so the serializer no longer loads the columns a second time. - @self is kept when a column has the same key, its times are in UTC as stored, so they can be used as they are in the createdAt and updatedAt filters, and it names the editor updatedBy/updatedAt like those filters. An empty creator stays null instead of "". - A relation is the uuid of the target row, its row id while the target has no uuid yet, and null when the target no longer exists: findUuidsByIds now returns null for an existing row without a uuid. - Stored datetimes with an unknown format are logged once per call. - The shape parameter documents the object shape; the tests cover the daylight saving gap and call getRow without a shape. Refs nextcloud#3096 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
A Behat scenario lists a table with ?shape=object and checks the uuid in @self, a value per column and null for a column without a value. Refs nextcloud#3096 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
The columns a row carries were built again for every row, also on the full listings of the frontend and API v1 that never use the object shape. The rows of one call now share the same maps. A test checks that a view's rows, listed and single, carry only the view's columns. Refs nextcloud#3096 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
There was a problem hiding this comment.
Verdict: REQUEST_CHANGES (Strict) — self-review posted as COMMENT (GitHub blocks a verdict on your own PR)
Status: all round-2 findings and the reopened Behat thread are addressed in c1210b35, fcb69854, efb21af7, 792be9d1, 412bd4b5, 7ccf9726, 8ea10023, after three pre-push checks (the last clean); all threads are resolved. The fixes also make the object shape JSON-only for now (a 400 for XML; an XML serialization follows on its own branch). phpunit 743/743, Behat
@rows14/14. A re-review decides the verdict.
Round 1's fixes hold: 8 of 11 findings are addressed and the decision on the key type holds. The Behat scenario covers only part of what was asked, so its thread is reopened, and round 2 adds 2 🟡, both claims the fixes made that are false on the main path. Under Strict a 🟡 blocks. The fixes follow as new commits on this branch.
| Round | Found | Status |
|---|---|---|
1 (32e3676a) |
🟡 4 · 🟢 7 | 9 resolved, f8 kept by decision; the Behat thread reopened (partly addressed) |
2 (ff1ce2d3), this review |
🟡 2 | open |
| Finding | Was | Now | Where |
|---|---|---|---|
| Behat scenario covers a table only, no view, datetime, link or relation | 🟢 → 🟡 | partly addressed, reopened | thread |
| 🟡 findPage copies the column map per row again, and adds a per-row filter to every api/2 listing | new | new | thread |
| 🟡 @self times cannot be used 'as they are' in the createdAt/updatedAt filters | new | new | thread |
Details of this round
- Scope: the fix commits
245f4e92,b302685b,ff1ce2d3(32e3676a..ff1ce2d3, 14 files, 404 lines). - Verified clean: The cells shape (
jsonSerialize,dataByAlias) is byte-for-byte unchanged; the frontend and API v1 listings now share one column map;@selfkeys, nullable types and openapi match;findUuidsByIdshas no other callers; the daylight-saving gap is pinned. - Partly addressed, not reopened: The time-only subtype of the datetime branch is still untested (harmless: only a warning would change).
- Checks on this head: phpunit 721/721, Behat APIv2
@rows13/13, psalm, cs and rector clean; CI php-cs, openapi and stylelint green, the rest queued. Gates: the runner is not available for this repo, so the repo's own checks stand in. - Connected issues: nextcloud#3096 (open); depends on nextcloud#3095 (#63) and nextcloud#3093, both open.
The counts steer the next round: fix rules ON — 9 of 10 round-2 findings across #65 and #66 were introduced by the fixes (1 copy missed), so every round-3 fix goes through the class sweep and a pre-push check that repeats until it comes back clean.
🤖 Generated with Claude Code
[skip ci] Signed-off-by: Nextcloud bot <bot@nextcloud.com>
findPage attached the payload with every column of the table or view and then filtered each row, which gave every row its own copy of the column map and a per-row filter on every listing. The payload is now attached with only the returned columns, after the data of a request for metadata only is emptied, so the rows of one listing share one map. Refs nextcloud#3096 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
The object shape returns the @self times as ATOM in UTC, with +00:00, but the createdAt and updatedAt filters refused any offset, so a time taken from a response was a bad request. A time that ends in Z or an offset of at most 14 hours is now converted to UTC, in which the meta fields are stored, and compared without it. Refs nextcloud#3096 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
Refs nextcloud#3096 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
A Behat scenario lists a table with a datetime, a time, a link and a relation column in the object shape, and a view of it with two of these columns. It checks the offset of the datetime, the link object, the uuid of the relation target, null for empty cells, the uuid in @self and that each object holds exactly the columns of the table or view. Refs nextcloud#3096 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
OCS renders a key that starts with @ as an XML attribute, so the @self block of the object shape made every XML response a 500. Until the object shape has an XML form, a request for it is refused with a 400 when the response would be XML, which OCS gives unless the format parameter or else the Accept header asks for JSON. Refs nextcloud#3096 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
The offset pattern accepted up to 14:59; the largest offset in use is +14:00, so anything beyond it is refused. Refs nextcloud#3096 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
A + in a query string reads as a space, so the offset of a time taken from @self has to be written as %2B there. The 400 of a single row also covers an unknown shape and the object shape for a response that is not JSON. Refs nextcloud#3096 Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
rjzondervan
left a comment
There was a problem hiding this comment.
Verdict: APPROVE (Strict, round-3 convergence) — self-review posted as COMMENT (GitHub blocks a verdict on your own PR)
Round 3 finds nothing new: all three round-2 points hold on the code and the delta adds no finding. Nothing stands between this PR and a merge. Its stopgap makes the object shape JSON-only for now; an XML serialization follows on its own branch.
| Round | Found | Status |
|---|---|---|
1 (32e3676a) |
🟡 4 · 🟢 7 | 10 resolved, the key type kept by decision |
2 (ff1ce2d3) |
🟡 2, Behat thread reopened | all resolved |
3 (8ea10023), this review |
— | nothing new |
| Finding | Was | Now | Where |
|---|---|---|---|
| findPage copies the column map per row again | 🟡 | addressed: one map per listing, refcount test | thread |
@self times not usable in the createdAt/updatedAt filters |
🟡 | addressed: Z and offsets up to ±14:00 converted to UTC; values without an offset reach the database unchanged | thread |
| Behat covers only a table | 🟡 | addressed: a table with datetime, time, link and relation, and a view, in the object shape | thread |
Details of this round
- Scope:
ff1ce2d3..8ea10023, seven commits (12 files), after three pre-push checks. - Verified clean: the offset conversion cannot change what an existing filter returns (none of the previously accepted formats ends in
Zor±HH:MM); the XML stopgap refuses exactly what OCS would have answered in XML, so no JSON client is refused (Accept: application/jsonwithoutformatpasses); the refcount test is robust on PHP 8.2+ and fails on per-row copies; the cells shape is unchanged. - Non-blocking notes:
getRows' "400:" line does not name the JSON-only refusal the waygetRow's does; the Behat datetime expectation assumes the test server has nodefault_timezone. Both can go with the XML branch. - Checks on this head: phpunit 743/743, Behat APIv2
@rows14/14, psalm, cs and rector clean, openapi up to date. Gates: the runner is not available for this repo, so the repo's own checks stand in. - Connected issues: nextcloud#3096 (open; part 1 of 2, closed by #66); depends on nextcloud#3095 (#63) and nextcloud#3093, both open.
🤖 Generated with Claude Code
…t-after-delete fix(contexts): close the edit dialog without an error after deleting the application
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…fix-npm-audit [main] Fix npm audit
…ify-3.x fix(deps): update dependency dompurify to ^3.4.18 (main)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…phar-7.x chore(deps): update dependency psalm/phar to ^7.6.0 (main)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…-rector-2.x chore(deps): update dependency rector/rector to ~2.8.5 (main)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…rse-5.x fix(deps): update dependency papaparse to ^5.7.1 (main)
…uter-5.x fix(deps): update dependency vue-router to ^5.5.1 (main)
…al-symbols-svg-400-0.x fix(deps): update dependency @material-symbols/svg-400 to ^0.49.0 (main)
Signed-off-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
…ce-4.x fix(deps): update dependency debounce to v4 (main)
Upstream continues with nextcloud#3229 for the row uuid, so take out the net change of nextcloud#3253 (the diff from its merge base with main to b5977db). The single-row GET and the uuid addressing of the row routes go with it. The row listing keeps the node helpers it uses. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
The row uuid of nextcloud#3229: column with a unique index, set on insert, backfill job, kept on user-migration import, uuid in TablesRow. It brings main up to 466339b and the version 2.5.0-dev.1. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The revert of nextcloud#3253 took findViewOrFail() with it, which the listing uses, so it comes back as a private helper. The tests construct RowService without the IDBConnection that nextcloud#3229 dropped and with the RowQueryResolver the listing added. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
Brings in the revert of nextcloud#3253 and nextcloud#3229 through the row listing. Conflicts: - RowOCSController: the single-row GET came from nextcloud#3253 and goes with the revert, together with the shape handling 3096/1 added to it; a numeric-id read of one row follows as its own commit. - RowSleeveMapper: findIdByUuid of nextcloud#3253 goes; findUuidsByIds of 3096/1 stays for now. - openapi.json and the TS types are regenerated. The controller and find-page tests that read a single row now read the listing; the findUuidsByIds tests use the sleeve helpers of nextcloud#3229. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
Row uuids are not used to address rows on the regular endpoints (nextcloud#3093), so the id in @self of the object shape is the numeric row id that the other api/2 routes take. The uuid of nextcloud#3229 is a separate read-only field, null for a row that has none yet. rowId goes, it would only repeat the id. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
A relation in the object shape is the row id of the target row, the identifier the api/2 routes and the filters take, and null when the target no longer exists. findUuidsByIds makes way for findExistingIds, which only tells which targets still exist. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
GET /api/2/{tables|views}/{nodeId}/rows/{rowId} returns one row of the
table or view, in the cells shape or with ?shape=object in the object
shape. The row id is the only identifier the route takes; a row outside
the table or view, or without read access to it, is not found. Federated
tables and views answer 400, as the listing does.
The single-row GET of nextcloud#3253 went with its revert; this one takes only
the numeric row id (nextcloud#3093).
Assisted-by: ClaudeCode:claude-opus-5-5
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Robert Zondervan <robert@conduction.nl>
Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
The properties of a row in the object shape followed the order in which the database returned the columns, which PostgreSQL does not keep stable. They now follow the column order of the table, as its column settings list them and then its other columns by id (the order in which they were created), and for a view the order of the view's column settings, as the frontend shows them. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
…umns Read a row through a view of two columns while the stored row has cells in the other columns too, and check that only the view's cells come back, in the data list as well as in the object shape. The test fails once both safeguards are gone: loading only the view's columns and filtering the result by them. Assisted-by: ClaudeCode:claude-opus-5-5 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Robert Zondervan <robert@conduction.nl>
rjzondervan
left a comment
There was a problem hiding this comment.
Verdict: APPROVE (delta re-review, Thorough)
Delta since 8ea1002: the 3095 merge, @self.id = row id with a read-only @self.uuid (rowId removed), relations read as the target row id, the single-row GET re-added (digits only, ?shape=cells|object, federated 400), and properties in the column order of the table or view.
Context: the stack moved off nextcloud#3253 (closed) onto nextcloud#3229 and follows the maintainer rule on nextcloud#3093: no row uuid addressing on normal endpoints; row ids only, uuid only as data.
🟡 Concerns
- No test pinned that a view's single row leaves out hidden cells — not a leak (the column load already restricts the cells); test added in 579e091, resolved.
- PR description is stale: it still says
@self.idis the row uuid next torowId, and relations are the uuid of the target row.
✅ Verified clean
- Single-row GET: table path checks the row's table and read permission (404 for missing, foreign and unreadable alike); view path checks read permission,
isRowInViewPresentandfilterRowResult. - Same
@selfshape, relation ids and column order on list and single GET, tables and views;findExistingIdsis chunked; nofindUuidsByIds/findIdByUuid/resolveRowIdleft in lib, tests, docs or spec.
Context
- Unit tests 859 OK on MySQL and PG16; Behat
@rows14/14 on both, the order scenario repeated on PG.
Internal review draft. This PR exists only to run the review skills on the fork before the upstream PR is opened. The base
review-base/3096isfeat/3095/row-listingat 6055296 (the head of #63, which includes main b195670), so the diff shows only this PR's own commits. The upstream PR description will be written separately.Part 1 of 2 of nextcloud#3096, split from #64: this PR reads rows as objects, #66 writes them. Depends on nextcloud#3095 (#63) and nextcloud#3093.
Changes
?shape=objectonGET /api/2/{tables|views}/{nodeId}/rowsand/rows/{rowId}returns one flat object per row, with a property for every column the row is read with (narrowed byfieldsand the view), keyed by the column's technical name (column_{id}without one) andnullwithout a value.cellsstays the default; an unknown shape is a 400. The object shape is JSON-only for now: requested as XML (format=xml, an XMLAcceptheader, or neither) it is a 400; an XML serialization follows on its own branch.@self:id(the row uuid),rowId,tableId,createdBy,createdAt,updatedBy,updatedAt, with the times in UTC as stored (…+00:00), so they can be used as they are, offset included, in thecreatedAt/updatedAtfilters of feat(rows): list rows on api/2 with filter, sort, search and paging #63 (in a query string+is written%2B). A column can never replace@self.default_timezone(newInstanceTimezone, falls back to UTC); a time in a daylight-saving gap reads as the moment after the jump. Links are{title, url, providerId}.nullwhen the target no longer exists. The targets are loaded in one chunked query (RowSleeveMapper::findUuidsByIds, which givesnullfor an existing row without a uuid).Row2carries the columns of its alias payload;findPageattaches only the returned columns, shared by the rows of one listing, so the serializer needs no column query of its own.RowQueryResolver: thecreatedAt/updatedAtfilters accept a time ending inZor an offset up to ±14:00 and convert it to UTC.RowShape,RowObjectSerializer, response typesTablesRowObject,TablesRowObjectPageand their parts; openapi.json and openapi.ts regenerated.Checks run locally
APIv2.feature @rows14/14 (incl. the two object-shape scenarios: a table and a view, with datetime, time, link and relation columns), psalm, cs and rector clean, openapi.json and openapi.ts regenerate without a diff.🤖 Generated with Claude Code