Documentation ¶
Index ¶
- Variables
- type Datastore
- func (d *Datastore) Batch(_ context.Context) (ds.Batch, error)
- func (d *Datastore) Close() error
- func (d *Datastore) Delete(ctx context.Context, key ds.Key) error
- func (d *Datastore) Get(ctx context.Context, key ds.Key) (value []byte, err error)
- func (d *Datastore) GetSize(ctx context.Context, key ds.Key) (int, error)
- func (d *Datastore) Has(ctx context.Context, key ds.Key) (bool, error)
- func (d *Datastore) PgxPool() *pgxpool.Pool
- func (d *Datastore) Put(ctx context.Context, key ds.Key, value []byte) error
- func (d *Datastore) Query(ctx context.Context, q dsq.Query) (dsq.Results, error)
- func (d *Datastore) Sync(ctx context.Context, key ds.Key) error
- type Option
- type Options
Constants ¶
This section is empty.
Variables ¶
View Source
var OptionDefaults = func(o *Options) error { o.Table = "blocks" return nil }
OptionDefaults are the default datastore options. This option will be automatically prepended to any options you pass to the Hydra Head constructor.
Functions ¶
This section is empty.
Types ¶
type Datastore ¶
type Datastore struct {
// contains filtered or unexported fields
}
Datastore is a PostgreSQL backed datastore.
func NewDatastore ¶
NewDatastore creates a new PostgreSQL datastore
func (*Datastore) Has ¶
Has determines if a value for the given key exists in the PostgreSQL database.
Click to show internal directories.
Click to hide internal directories.