sqlhelp

package
v0.0.0-...-ffb091d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SQLHelper

type SQLHelper struct {
	DB                      *sql.DB
	UseNumericInsertMarks   bool
	WipeDatabaseFunc        func(*SQLHelper) error
	IsUniqueConstraintError func(error) bool

	GetProjectQuery           string
	AddProjectQuery           string
	UpdateProjectQuery        string
	GetProjectsQuery          string
	GetNamespacesByNamesQuery string
	GetNamespacesForUserQuery string
	GetProjectHooksQuery      string
	SetProjectHooksQuery      string

	AddApplicationQuery      string
	UpdateApplicationQuery   string
	GetApplicationsQuery     string
	GetApplicationQuery      string
	GetApplicationHooksQuery string
	SetApplicationHooksQuery string

	DeleteSubscriptionsQuery        string
	AddSubscriptionQuery            string
	GetDownstreamSubscriptionsQuery string

	AddReleaseQuery                                 string
	UpdateReleaseQuery                              string
	GetReleaseQuery                                 string
	GetAllReleasesQuery                             string
	GetAllReleasesWithoutProcessedDependenciesQuery string
	FindAllVersionsQuery                            string

	GetReleaseByTagQuery  string
	UpdateReleaseTagQuery string
	AddReleaseTagQuery    string

	InsertDependencyQuery          string
	GetDependenciesQuery           string
	GetDownstreamDependenciesQuery string

	GetPackageURIsQuery string
	AddPackageURIQuery  string

	CreateUserIDMetricsQuery     string
	GetMetricsByUserIDQuery      string
	SetProjectCountMetricForUser string

	GetProviderReleasesQuery    string
	GetProvidersForReleaseQuery string
	SetProviderQuery            string
	UpdateProviderQuery         string

	HardDeleteProjectPackageURIsQuery         string
	HardDeleteProjectUnitSubscriptions        string
	HardDeleteProjectReleaseDependenciesQuery string
	HardDeleteProjectReleasesQuery            string
	HardDeleteProjectApplicationsQuery        string
	HardDeleteProjectQuery                    string
}

func (*SQLHelper) AddApplication

func (s *SQLHelper) AddApplication(app *Application) error

func (*SQLHelper) AddNamespace

func (s *SQLHelper) AddNamespace(namespace *Project) error

func (*SQLHelper) AddPackageURI

func (s *SQLHelper) AddPackageURI(release *Release, uri string) error

func (*SQLHelper) AddRelease

func (s *SQLHelper) AddRelease(release *Release) error

func (*SQLHelper) FindAllVersions

func (s *SQLHelper) FindAllVersions(app *Application) ([]string, error)

func (*SQLHelper) GetAllReleases

func (s *SQLHelper) GetAllReleases() ([]*Release, error)

func (*SQLHelper) GetAllReleasesWithoutProcessedDependencies

func (s *SQLHelper) GetAllReleasesWithoutProcessedDependencies() ([]*Release, error)

func (*SQLHelper) GetApplication

func (s *SQLHelper) GetApplication(namespace, name string) (*Application, error)

func (*SQLHelper) GetApplicationHooks

func (s *SQLHelper) GetApplicationHooks(app *Application) (Hooks, error)

func (*SQLHelper) GetApplications

func (s *SQLHelper) GetApplications(namespace string) (map[string]*Application, error)

func (*SQLHelper) GetDependencies

func (s *SQLHelper) GetDependencies(release *Release) ([]*Dependency, error)

func (*SQLHelper) GetDependencyTree

func (s *SQLHelper) GetDependencyTree(release *Release) ([]*DependencyTree, error)

func (*SQLHelper) GetDownstreamDependencies

func (s *SQLHelper) GetDownstreamDependencies(release *Release) ([]*Dependency, error)

func (*SQLHelper) GetDownstreamDependenciesFilteredBy

func (s *SQLHelper) GetDownstreamDependenciesFilteredBy(release *Release, f *DownstreamDependenciesFilter) ([]*Dependency, error)

func (*SQLHelper) GetDownstreamHooks

func (s *SQLHelper) GetDownstreamHooks(app *Application) ([]*Hooks, error)

func (*SQLHelper) GetNamespace

func (s *SQLHelper) GetNamespace(namespace string) (*Project, error)

func (*SQLHelper) GetNamespaceHooks

func (s *SQLHelper) GetNamespaceHooks(namespace *Project) (Hooks, error)

func (*SQLHelper) GetNamespaces

func (s *SQLHelper) GetNamespaces() (map[string]*Project, error)

func (*SQLHelper) GetNamespacesByNames

func (s *SQLHelper) GetNamespacesByNames(namespaces []string) (map[string]*Project, error)

func (*SQLHelper) GetNamespacesFilteredBy

func (s *SQLHelper) GetNamespacesFilteredBy(f *NamespacesFilter) (map[string]*Project, error)

func (*SQLHelper) GetNamespacesForUser

func (s *SQLHelper) GetNamespacesForUser(namespaces []string) (map[string]*Project, error)

func (*SQLHelper) GetPackageURIs

func (s *SQLHelper) GetPackageURIs(release *Release) ([]string, error)

func (*SQLHelper) GetProviders

func (s *SQLHelper) GetProviders(providerName string) (map[string]*MinimalReleaseMetadata, error)

func (*SQLHelper) GetProvidersFilteredBy

func (s *SQLHelper) GetProvidersFilteredBy(providerName string, f *ProvidersFilter) (map[string]*MinimalReleaseMetadata, error)

func (*SQLHelper) GetRelease

func (s *SQLHelper) GetRelease(namespace, name, releaseId string) (*Release, error)

func (*SQLHelper) GetReleaseByTag

func (s *SQLHelper) GetReleaseByTag(namespace, name, tag string) (*Release, error)

func (*SQLHelper) GetUserMetrics

func (s *SQLHelper) GetUserMetrics(userID string) (*Metrics, error)

func (*SQLHelper) HardDeleteNamespace

func (s *SQLHelper) HardDeleteNamespace(namespace string) error

func (*SQLHelper) PrepareAndExec

func (s *SQLHelper) PrepareAndExec(query string, arg ...interface{}) error

func (*SQLHelper) PrepareAndExecInsert

func (s *SQLHelper) PrepareAndExecInsert(query string, arg ...interface{}) error

func (*SQLHelper) PrepareAndExecInsertIgnoreDups

func (s *SQLHelper) PrepareAndExecInsertIgnoreDups(query string, arg ...interface{}) error

func (*SQLHelper) PrepareAndExecUpdate

func (s *SQLHelper) PrepareAndExecUpdate(query string, arg ...interface{}) error

func (*SQLHelper) PrepareAndQuery

func (s *SQLHelper) PrepareAndQuery(query string, arg ...interface{}) (*sql.Rows, error)

func (*SQLHelper) ReadRowsIntoStringArray

func (s *SQLHelper) ReadRowsIntoStringArray(rows *sql.Rows) ([]string, error)

func (*SQLHelper) RegisterProviders

func (s *SQLHelper) RegisterProviders(release *core.ReleaseMetadata) error

func (*SQLHelper) SetApplicationHooks

func (s *SQLHelper) SetApplicationHooks(app *Application, hooks Hooks) error

func (*SQLHelper) SetApplicationSubscribesToUpdatesFrom

func (s *SQLHelper) SetApplicationSubscribesToUpdatesFrom(app *Application, upstream []*Application) error

func (*SQLHelper) SetDependencies

func (s *SQLHelper) SetDependencies(release *Release, depends []*Dependency) error

func (*SQLHelper) SetDependencyTree

func (s *SQLHelper) SetDependencyTree(release *Release, depends []*DependencyTree) error

func (*SQLHelper) SetNamespaceHooks

func (s *SQLHelper) SetNamespaceHooks(namespace *Project, hooks Hooks) error

func (*SQLHelper) SetUserMetrics

func (s *SQLHelper) SetUserMetrics(userID string, previous, new *Metrics) error

func (*SQLHelper) TagRelease

func (s *SQLHelper) TagRelease(rel *Release, tag string) error

func (*SQLHelper) UpdateApplication

func (s *SQLHelper) UpdateApplication(app *Application) error

func (*SQLHelper) UpdateNamespace

func (s *SQLHelper) UpdateNamespace(namespace *Project) error

func (*SQLHelper) UpdateRelease

func (s *SQLHelper) UpdateRelease(release *Release) error

func (*SQLHelper) WipeDatabase

func (s *SQLHelper) WipeDatabase() error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL