Databases
Timeplus Proton Streaming SQL in VS Code
DBCode connects to Timeplus Proton with the official JavaScript driver. You can browse stream metadata, work across accessible databases, run finite historical queries, consume live streaming results, and insert or delete rows in simple finite Stream results without leaving VS Code.
Connecting
Section titled “Connecting”Create a connection in DBCode and enter:
- Host: Your Proton server hostname
- Port:
3218 - Database: Select any database the Proton user can access
- Username:
default, unless you configured another user - Password: Leave empty for an unsecured local Proton instance
- SSL: Enable this when the Proton HTTP endpoint is configured for TLS
DBCode uses Proton’s streaming HTTP endpoint on port 3218 for every operation. Port 8123 is not required. Plain HTTP is Proton’s default, and DBCode also supports HTTPS endpoints with standard certificate verification, custom CA certificates, and client certificates.
DBCode reads system.databases for the connection’s database picker and sends Proton’s database parameter with every request. A standard local installation normally exposes only default; deployments can expose additional databases according to the connected user’s access.
SQL files, notebooks, and query builder
Section titled “SQL files, notebooks, and query builder”Timeplus Proton uses streaming SQL as its main query interface. From a database node you can create a SQL query, create a notebook, run a SQL file, or open the visual query builder.
Live and historical queries
Section titled “Live and historical queries”A raw query against a stream keeps Proton’s live streaming behavior:
CREATE RANDOM STREAM dbcode_demo ( id uint64 DEFAULT rand64(), value string DEFAULT random_printable_ascii(12)) SETTINGS eps=5;
SELECT id, valueFROM dbcode_demo;The result remains open as events arrive. Use the result controls to pause reads, resume them, or stop the stream. Stopping or cancelling aborts the current HTTP query. Disconnecting also stops any open streams.
For a finite historical result, wrap the stream with table():
SELECT id, valueFROM table(dbcode_demo)LIMIT 100;You can also request Proton’s table query mode explicitly:
SELECT id, valueFROM dbcode_demoSETTINGS query_mode='table';Queries generated by DBCode for browsing, metadata, monitoring, and connection checks automatically use historical mode.
Browsing and editing
Section titled “Browsing and editing”The schema tree loads progressively and includes streams, external streams, views, materialized views, and functions. Columns follow Proton’s catalog position: declared columns appear in creation order, followed by Proton-managed system columns such as _tp_time and _tp_sn. DBCode can show object DDL and EXPLAIN PLAN output for supported queries.
Simple finite results from an internal Stream support inserting and deleting rows, including exact integers and decimals, dates, strings, Unicode, and NULL values. Standard UPDATE ... SET editing remains disabled because Proton streams model changes through inserts: versioned streams replace a key with a newer event, while changelog streams carry change events.
Live streaming results, views, materialized views, and external streams are read-only.
Stream semantics
Section titled “Stream semantics”Proton stream storage is non-transactional, so DBCode does not show transaction controls. Live streaming result sets are read as events and are not directly edited. Use a simple finite query against an internal Stream when you want grid insert or delete actions.
For Proton installation and SQL details, see the Timeplus Proton documentation.