JDBC Driver
The Proton JDBC driver enables Java applications to connect to Timeplus Proton using standard JDBC APIs.Installation
Maven
Gradle
Direct Download
Download the latest JAR from GitHub Releases.Connection
JDBC URL Format
Default Values
- Host:
localhost - Port:
8123(HTTP) or3218(native) - Database:
default - Username:
default - Password: (empty)
Basic Example
Query Examples
Historical Query
Streaming Query with LIMIT
Prepared Statements
Insert Data
Port Selection
Port 8123 (Batch Mode)
Port 3218 (Streaming Mode)
DBeaver Configuration
- Open Database → Driver Manager → New
- Configure:
- Driver Name: Timeplus Proton
- Class Name:
com.timeplus.proton.jdbc.ProtonDriver - URL Template:
jdbc:proton://{host}:{port}/{database} - Default Port:
8123 - Default Database:
default
- In Libraries tab: Add Artifact
com.timeplus:proton-jdbc:0.6.0 - Click Find Class to load driver
- Create connection with
localhost:8123
Resources
Python Driver
The Proton Python driver provides a native Python interface for Timeplus Proton.Installation
Connection
Query Examples
Simple Query
Query with Parameters
Stream Processing
Insert Data
Pandas Integration
Resources
Go Driver
The Proton Go driver provides a native Go interface for Timeplus Proton.Installation
Connection
Query Examples
Simple Query
Scan into Struct
Insert Data
Resources
REST API Client
For languages without native drivers, use the REST API over HTTP.Example: cURL
Example: Python requests
Comparison
| Feature | JDBC | Python | Go | REST API |
|---|---|---|---|---|
| Installation | Maven/Gradle | pip | go get | N/A |
| Protocol | Native/HTTP | Native/HTTP | Native | HTTP |
| Streaming | ✓ | ✓ | ✓ | ✓ |
| Prepared Statements | ✓ | ✓ | ✓ | ✗ |
| Connection Pooling | ✓ | ✓ | ✓ | Manual |
| Type Safety | ✓ | Partial | ✓ | ✗ |
Best Practices
Port Selection
- Port 8123 (HTTP): Use for batch queries, returns all existing data
- Port 3218 (Native): Use for streaming queries, requires LIMIT or table()
Query Modes
Batch Mode (Port 8123)
Streaming Mode (Port 3218)
Connection Management
- Use connection pooling: Don’t create new connections for each query
- Close resources: Always close ResultSet, Statement, Connection
- Handle timeouts: Set appropriate query timeouts
- Retry logic: Implement retry for transient failures