Bug Description
When viewing long jsonb values in DBCode, the content is truncated and cannot be viewed completely.
The same truncation happens in multiple places:
- Directly browsing table data
- Viewing the value through a SQL query
- Exporting the result to CSV
For long jsonb fields, DBCode shows only partial content and appends a size marker such as ... (~2KB). Currently I cannot find a way to view or export the full original jsonb value inside DBCode.
The related table/data below has been anonymized.
Repro steps
- Connect to a PostgreSQL database in DBCode.
- Create a table with a
jsonb column, for example:
CREATE TABLE public.example_generation_record (
id bigint NOT NULL,
-- ...
reference_files jsonb DEFAULT '[]'::jsonb NOT NULL,
-- ...
);
- Insert or query a row containing a relatively long
jsonb value, for example:
INSERT INTO public.example_generation_record (
id,
...
reference_files,
...
) VALUES (
1,
...
'[
{
"id": "prop:00000000-0000-0000-0000-000000000000",
"url": "https://example.com/uploaded-files/example-image.png",
"type": "image",
"label": "example image label",
"source": "asset_context",
"view_id": "00000000-0000-0000-0000-000000000000",
"asset_id": "00000000-0000-0000-0000-000000000000",
"state_id": "00000000-0000-0000-0000-000000000000",
"metadata": {
"long_text": "This is a long anonymized jsonb field. Repeat this text many times to make the jsonb value larger than a few KB. This should be enough to reproduce the truncation behavior in the DBCode result grid and CSV export."
}
},
...
]'::jsonb,
...
);
- View the table data directly in DBCode.
- Run a query such as:
SELECT reference_files
FROM public.example_generation_record
WHERE id = 1;
- Observe that the
jsonb value is truncated and ends with something like:
- Export the query result or table data as CSV.
- Open the exported CSV and observe that the exported value is also truncated.
Expected Behavior
DBCode should provide a way to view and export the full jsonb value.
For example:
- The result grid could show a truncated preview, but allow opening the full cell value in a separate viewer/editor.
- SQL query results should preserve the full value internally.
- CSV export should export the complete original
jsonb content, not the truncated display preview.
Actual Behavior
Long jsonb values are truncated in the DBCode UI.
The truncated value appears to include a size marker like:
The same truncated content is also exported to CSV, so the original full jsonb data cannot be retrieved through DBCode.
Environment
- DBCode version: 1.31.2
- VS Code (or fork) version: 1.120.0 (Universal)
- OS: MacOS
- Database: PostgreSQL
- Connection: direct
Error Meesages (if applicable)
No error message is shown. The jsonb value is silently truncated.
Screenshots
If applicable, add screenshots showing:
- The truncated
jsonb value in the result grid
- The
... (~2KB) suffix
- The exported CSV containing the same truncated value
Logs
If available, paste relevant logs from the Output panel: View > Output > DBCode.
Bug Description
When viewing long
jsonbvalues in DBCode, the content is truncated and cannot be viewed completely.The same truncation happens in multiple places:
For long
jsonbfields, DBCode shows only partial content and appends a size marker such as... (~2KB). Currently I cannot find a way to view or export the full originaljsonbvalue inside DBCode.The related table/data below has been anonymized.
Repro steps
jsonbcolumn, for example:jsonbvalue, for example:jsonbvalue is truncated and ends with something like:Expected Behavior
DBCode should provide a way to view and export the full
jsonbvalue.For example:
jsonbcontent, not the truncated display preview.Actual Behavior
Long
jsonbvalues are truncated in the DBCode UI.The truncated value appears to include a size marker like:
The same truncated content is also exported to CSV, so the original full
jsonbdata cannot be retrieved through DBCode.Environment
Error Meesages (if applicable)
Screenshots
If applicable, add screenshots showing:
jsonbvalue in the result grid... (~2KB)suffixLogs
If available, paste relevant logs from the Output panel: View > Output > DBCode.