mirror of
https://github.com/jeremyd/ergo.git
synced 2026-08-02 04:03:05 -07:00
e7558f292c
* default build includes everything * allow compiling out PRECIS and Skeleton (still included by default) * consistently use `postgresql` in identifiers
32 lines
841 B
Go
32 lines
841 B
Go
//go:build !postgresql
|
|
|
|
// Copyright (c) 2020 Shivaram Lingamneni
|
|
// released under the MIT license
|
|
|
|
package postgresql
|
|
|
|
import (
|
|
"errors"
|
|
|
|
"github.com/ergochat/ergo/irc/history"
|
|
"github.com/ergochat/ergo/irc/logger"
|
|
)
|
|
|
|
// Enabled is false when PostgreSQL support is not compiled in
|
|
const Enabled = false
|
|
|
|
// PostgreSQL is a stub implementation when the postgres build tag is not present
|
|
type PostgreSQL struct {
|
|
history.Database
|
|
}
|
|
|
|
// NewPostgreSQLDatabase returns an error when PostgreSQL support is not compiled in
|
|
func NewPostgreSQLDatabase(logger *logger.Manager, config Config) (*PostgreSQL, error) {
|
|
return nil, errors.New("PostgreSQL support not enabled in this build. Rebuild with `make build_full` to enable")
|
|
}
|
|
|
|
// SetConfig is a no-op for the stub implementation
|
|
func (pg *PostgreSQL) SetConfig(config Config) {
|
|
// no-op
|
|
}
|