Documentation ¶
Index ¶
- Constants
- Variables
- func NewHasuraError(data []byte, isCmd bool) error
- func WithInstance(config *Config, logger *log.Logger, hasuraOpts *database.HasuraOpts) (database.Driver, error)
- type Config
- type HasuraDB
- func (h *HasuraDB) Close() error
- func (h *HasuraDB) Drop() error
- func (h *HasuraDB) EnableCheckMetadataConsistency(enabled bool)
- func (h *HasuraDB) ExportSchemaDump(includeSchemas []string, excludeSchemas []string, sourceName string, ...) ([]byte, error)
- func (h *HasuraDB) First() (migrationVersion *database.MigrationVersion, ok bool)
- func (h *HasuraDB) GetSetting(name string) (value string, err error)
- func (h *HasuraDB) InsertVersion(version int64) error
- func (h *HasuraDB) Last() (*database.MigrationVersion, bool)
- func (h *HasuraDB) Lock() error
- func (h *HasuraDB) Next(version uint64) (migrationVersion *database.MigrationVersion, ok bool)
- func (h *HasuraDB) Open(url string, isCMD bool, logger *log.Logger, hasuraOpts *database.HasuraOpts) (database.Driver, error)
- func (h *HasuraDB) Prev(version uint64) (prevVersion *database.MigrationVersion, ok bool)
- func (h *HasuraDB) PushToList(migration io.Reader, fileType string, l *database.CustomList) error
- func (h *HasuraDB) Query(data interface{}) error
- func (h *HasuraDB) Read(version uint64) (ok bool)
- func (h *HasuraDB) RemoveVersion(version int64) error
- func (h *HasuraDB) ResetQuery()
- func (h *HasuraDB) Run(migration io.Reader, fileType, fileName string) error
- func (h *HasuraDB) Scan() error
- func (h *HasuraDB) SetVersion(version int64, dirty bool) error
- func (h *HasuraDB) Squash(l *database.CustomList, ret chan<- interface{})
- func (h *HasuraDB) UnLock() error
- func (h *HasuraDB) UpdateSetting(name string, value string) error
- func (h *HasuraDB) Version() (version int64, dirty bool, err error)
- type HasuraError
- type HasuraInterfaceBulk
- type HasuraInterfaceQuery
- type InconsistentMetadataError
- type PostgresError
- type SQLInternalError
- type SchemaDump
Constants ¶
View Source
const (
DefaultDatabaseName = "default"
)
Variables ¶
Functions ¶
func NewHasuraError ¶
NewHasuraError - returns error based on data and isCmd
func WithInstance ¶
Types ¶
type HasuraDB ¶
type HasuraDB struct {
// contains filtered or unexported fields
}
func (*HasuraDB) EnableCheckMetadataConsistency ¶
func (*HasuraDB) ExportSchemaDump ¶
func (*HasuraDB) First ¶
func (h *HasuraDB) First() (migrationVersion *database.MigrationVersion, ok bool)
func (*HasuraDB) InsertVersion ¶
func (*HasuraDB) Next ¶
func (h *HasuraDB) Next(version uint64) (migrationVersion *database.MigrationVersion, ok bool)
func (*HasuraDB) Prev ¶
func (h *HasuraDB) Prev(version uint64) (prevVersion *database.MigrationVersion, ok bool)
func (*HasuraDB) PushToList ¶
func (*HasuraDB) RemoveVersion ¶
func (*HasuraDB) ResetQuery ¶
func (h *HasuraDB) ResetQuery()
func (*HasuraDB) Squash ¶
func (h *HasuraDB) Squash(l *database.CustomList, ret chan<- interface{})
type HasuraError ¶
type HasuraError struct { Path string `json:"path"` ErrorMessage string `json:"error"` Internal interface{} `json:"internal,omitempty"` Message string `json:"message,omitempty"` Code string `json:"code"` // contains filtered or unexported fields }
func (HasuraError) Error ¶
func (h HasuraError) Error() string
type HasuraInterfaceBulk ¶
type HasuraInterfaceBulk struct { Type string `json:"type" yaml:"type"` Args []interface{} `json:"args" yaml:"args"` }
func (*HasuraInterfaceBulk) ResetArgs ¶
func (h *HasuraInterfaceBulk) ResetArgs()
type HasuraInterfaceQuery ¶
type InconsistentMetadataError ¶
type InconsistentMetadataError struct { Definition interface{} `json:"definition,omitempty" mapstructure:"definition,omitempty"` Reason string `json:"reason,omitempty" mapstructure:"reason,omitempty"` Type string `json:"type,omitempty" mapstructure:"type,omitempty"` }
func (*InconsistentMetadataError) String ¶
func (mderror *InconsistentMetadataError) String() string
type PostgresError ¶
type PostgresError struct { StatusCode string `json:"status_code" mapstructure:"status_code,omitempty"` ExecStatus string `json:"exec_status" mapstructure:"exec_status,omitempty"` Message string `json:"message" mapstructure:"message,omitempty"` Description string `json:"description" mapstructure:"description,omitempty"` Hint string `json:"hint" mapstructure:"hint,omitempty"` }
type SQLInternalError ¶
type SQLInternalError struct { Arguments []string `json:"arguments" mapstructure:"arguments,omitempty"` Error *PostgresError `json:"error" mapstructure:"error,omitempty"` Prepared bool `json:"prepared" mapstructure:"prepared,omitempty"` Statement string `json:"statement" mapstructure:"statement,omitempty"` InconsistentMetadataError `mapstructure:",squash"` }
type SchemaDump ¶
Click to show internal directories.
Click to hide internal directories.