Skip to content

Commit 61d29e2

Browse files
HTTP log level debug
1 parent 11519ec commit 61d29e2

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

examples/proxy-oracle-debezium/README.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ This example demonstrates real-time data replication from an Oracle database to
66

77
- Docker and Docker Compose
88
- `curl` for API testing
9-
- `ha` CLI tool installed locally
9+
- `ha` CLI tool installed locally (Optional)
1010

1111
```sh
1212
go install github.com/litesql/ha@latest
@@ -68,6 +68,20 @@ In the HA CLI, run:
6868
INSERT INTO users(name, email) VALUES('Test User', 'test@user');
6969
```
7070

71+
Alternatively, use the HTTP API:
72+
73+
```sh
74+
curl http://localhost:8080/query \
75+
-d '
76+
{
77+
"sql": "INSERT INTO users(name, email) VALUES(:name, :email)",
78+
"params": {
79+
"name": "Test User",
80+
"email": "test@user"
81+
}
82+
}'
83+
```
84+
7185
This query will be redirect to Oracle and replicated back to HA SQLite.
7286

7387
### Step 4: Verify Data in Oracle

internal/sqlite/db.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ type execerQuerier interface {
346346
}
347347

348348
func Exec(ctx context.Context, eq execerQuerier, sql string, params map[string]any) (*Response, error) {
349-
slog.Info("Executing statement", "sql", sql, "params", params)
349+
slog.Debug("Executing statement", "sql", sql, "params", params)
350350
upper := strings.ToUpper(strings.TrimSpace(sql))
351351
if strings.HasPrefix(upper, "SELECT") || strings.HasPrefix(upper, "EXPLAIN") {
352352
return doQuery(ctx, eq, sql, params)

0 commit comments

Comments
 (0)