feat(gl): expose ledger application and grpc operations

This commit is contained in:
2026-08-14 19:11:29 +03:30
parent 0b3eaa0c3d
commit 76905ab451
17 changed files with 1724 additions and 16 deletions
+17
View File
@@ -18,6 +18,13 @@ type Row interface {
Scan(dest ...any) error
}
type Rows interface {
Next() bool
Scan(dest ...any) error
Err() error
Close()
}
type Tx interface {
Exec(context.Context, string, ...any) (pgconn.CommandTag, error)
QueryRow(context.Context, string, ...any) Row
@@ -27,7 +34,9 @@ type Tx interface {
type Database interface {
Begin(context.Context) (Tx, error)
Exec(context.Context, string, ...any) (pgconn.CommandTag, error)
QueryRow(context.Context, string, ...any) Row
Query(context.Context, string, ...any) (Rows, error)
Ping(context.Context) error
Close()
}
@@ -70,6 +79,14 @@ func (p *Pool) QueryRow(ctx context.Context, sql string, args ...any) Row {
return p.pool.QueryRow(ctx, sql, args...)
}
func (p *Pool) Query(ctx context.Context, sql string, args ...any) (Rows, error) {
return p.pool.Query(ctx, sql, args...)
}
func (p *Pool) Exec(ctx context.Context, sql string, args ...any) (pgconn.CommandTag, error) {
return p.pool.Exec(ctx, sql, args...)
}
func (p *Pool) Close() {
p.pool.Close()
}