 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- func WithInstance(config *Config, logger *log.Logger) (database.Driver, error)
- type Config
- type HasuraArgs
- type HasuraBulk
- type HasuraColumn
- type HasuraDB
- func (h *HasuraDB) ApplyMetadata(data interface{}) error
- func (h *HasuraDB) Close() error
- func (h *HasuraDB) Drop() error
- func (h *HasuraDB) ExportMetadata() (interface{}, error)
- func (h *HasuraDB) ExportSchemaDump(schemaNames []string) ([]byte, error)
- func (h *HasuraDB) First() (version uint64, ok bool)
- func (h *HasuraDB) GetSetting(name string) (value string, err error)
- func (h *HasuraDB) InsertVersion(version int64) error
- func (h *HasuraDB) Last() (version uint64, ok bool)
- func (h *HasuraDB) Lock() error
- func (h *HasuraDB) Next(version uint64) (nextVersion uint64, ok bool)
- func (h *HasuraDB) Open(url string, isCMD bool, logger *log.Logger) (database.Driver, error)
- func (h *HasuraDB) Prev(version uint64) (prevVersion uint64, ok bool)
- func (h *HasuraDB) Query(data []interface{}) error
- func (h *HasuraDB) Read(version uint64) (ok bool)
- func (h *HasuraDB) ReloadMetadata() error
- func (h *HasuraDB) RemoveVersion(version int64) error
- func (h *HasuraDB) Reset() error
- func (h *HasuraDB) ResetMetadata() error
- func (h *HasuraDB) ResetQuery()
- func (h *HasuraDB) Run(migration io.Reader, fileType, fileName string) error
- 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 HasuraOrderBy
- type HasuraQuery
- type HasuraSQLRes
- type PostgresError
- type SQLInternalError
- type SchemaDump
Constants ¶
      View Source
      
  
    const ( DefaultMigrationsTable = "schema_migrations" DefaultSchema = "hdb_catalog" )
      View Source
      
  
    const ( TuplesOK = "TuplesOk" CommandOK = "CommandOk" )
      View Source
      
  
const (
	DefaultSettingsTable = "migration_settings"
)
    Variables ¶
Functions ¶
Types ¶
type HasuraArgs ¶
type HasuraArgs struct {
	SQL       string        `json:"sql,omitempty" yaml:"sql"`
	Table     interface{}   `json:"table,omitempty"`
	Columns   interface{}   `json:"columns,omitempty"`
	Where     interface{}   `json:"where,omitempty"`
	OrderBy   interface{}   `json:"order_by,omitempty"`
	Objects   []interface{} `json:"objects,omitempty"`
	Limit     int           `json:"limit,omitempty"`
	Returning []string      `json:"returning,omitempty"`
	Set       interface{}   `json:"$set,omitempty"`
}
    type HasuraBulk ¶
type HasuraBulk struct {
	Type string        `json:"type" yaml:"type"`
	Args []HasuraQuery `json:"args" yaml:"args"`
}
    type HasuraColumn ¶
type HasuraColumn struct {
	Name    string      `json:"name"`
	Columns interface{} `json:"columns,omitempty"`
}
    type HasuraDB ¶
type HasuraDB struct {
	// contains filtered or unexported fields
}
    func (*HasuraDB) ApplyMetadata ¶
func (*HasuraDB) ExportMetadata ¶
func (*HasuraDB) ExportSchemaDump ¶
func (*HasuraDB) InsertVersion ¶
func (*HasuraDB) ReloadMetadata ¶
ReloadMetadata - Reload Hasura GraphQL Engine metadata on the database
func (*HasuraDB) RemoveVersion ¶
func (*HasuraDB) ResetMetadata ¶
func (*HasuraDB) ResetQuery ¶
func (h *HasuraDB) ResetQuery()
type HasuraError ¶
type HasuraError struct {
	Path         string            `json:"path"`
	ErrorMessage string            `json:"error"`
	Internal     *SQLInternalError `json:"internal,omitempty"`
	Message      string            `json:"message,omitempty"`
	Code         string            `json:"code"`
	// contains filtered or unexported fields
}
    func (*HasuraError) APIError ¶
func (h *HasuraError) APIError() error
func (*HasuraError) CMDError ¶
func (h *HasuraError) CMDError() error
func (*HasuraError) Error ¶
func (h *HasuraError) Error(isCMD bool) error
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 HasuraInterfaceQuery struct {
	Type string      `json:"type" yaml:"type"`
	Args interface{} `json:"args" yaml:"args"`
}
    type HasuraOrderBy ¶
type HasuraQuery ¶
type HasuraQuery struct {
	Type string     `json:"type" yaml:"type"`
	Args HasuraArgs `json:"args" yaml:"args"`
}
    type HasuraSQLRes ¶
type PostgresError ¶
type SQLInternalError ¶
type SQLInternalError struct {
	Arguments []string      `json:"arguments"`
	Error     PostgresError `json:"error"`
	Prepared  bool          `json:"prepared"`
	Statement string        `json:"statement"`
}
    type SchemaDump ¶
 Click to show internal directories. 
   Click to hide internal directories.