sqlite

package
v0.7.0-rc3 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2021 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package sqlite provides the Sqlite data definition language (DDL) for Vela.

Usage:

import "github.com/go-vela/server/database/ddl/sqlite"

Index

Constants

View Source
const (
	// CreateBuildTable represents a query to
	// create the builds table for Vela.
	CreateBuildTable = `` /* 778-byte string literal not displayed */

	// CreateBuildRepoIDNumberIndex represents a query to create an
	// index on the builds table for the repo_id and number columns.
	CreateBuildRepoIDNumberIndex = `
CREATE INDEX
IF NOT EXISTS
builds_repo_id_number
ON builds (repo_id, number);
`

	// CreateBuildRepoIDIndex represents a query to create an
	// index on the builds table for the repo_id column.
	CreateBuildRepoIDIndex = `
CREATE INDEX
IF NOT EXISTS
builds_repo_id
ON builds (repo_id);
`

	// CreateBuildStatusIndex represents a query to create an
	// index on the builds table for the status column.
	CreateBuildStatusIndex = `
CREATE INDEX
IF NOT EXISTS
builds_status
ON builds (status);
`
)
View Source
const (
	// CreateHookTable represents a query to
	// create the hooks table for Vela.
	CreateHookTable = `` /* 311-byte string literal not displayed */

	// CreateHookRepoIDNumberIndex represents a query to create an
	// index on the hooks table for the repo_id and number columns.
	CreateHookRepoIDNumberIndex = `
CREATE INDEX
IF NOT EXISTS
hooks_repo_id_number
ON hooks (repo_id, number);
`

	// CreateHookRepoIDIndex represents a query to create an
	// index on the hooks table for the repo_id column.
	CreateHookRepoIDIndex = `
CREATE INDEX
IF NOT EXISTS
hooks_repo_id
ON hooks (repo_id);
`
)
View Source
const (
	// CreateLogTable represents a query to
	// create the logs table for Vela.
	CreateLogTable = `` /* 243-byte string literal not displayed */

	// CreateLogBuildIDIndex represents a query to create an
	// index on the logs table for the build_id column.
	CreateLogBuildIDIndex = `
CREATE INDEX
IF NOT EXISTS
logs_build_id
ON logs (build_id);
`

	// CreateLogStepIDIndex represents a query to create an
	// index on the logs table for the step_id column.
	CreateLogStepIDIndex = `
CREATE INDEX
IF NOT EXISTS
logs_step_id
ON logs (step_id);
`

	// CreateLogServiceIDIndex represents a query to create an
	// index on the logs table for the service_id column.
	CreateLogServiceIDIndex = `
CREATE INDEX
IF NOT EXISTS
logs_service_id
ON logs (service_id);
`
)
View Source
const (
	// CreateRepoTable represents a query to
	// create the repos table for Vela.
	CreateRepoTable = `` /* 516-byte string literal not displayed */

	// CreateRepoOrgNameIndex represents a query to create an
	// index on the repos table for the org and name columns.
	CreateRepoOrgNameIndex = `
CREATE INDEX
IF NOT EXISTS
repos_org_name
ON repos (org, name);
`

	// CreateRepoFullNameIndex represents a query to create an
	// index on the repos table for the full_name column.
	CreateRepoFullNameIndex = `
CREATE INDEX
IF NOT EXISTS
repos_full_name
ON repos (full_name);
`
)
View Source
const (
	// CreateSecretTable represents a query to
	// create the secrets table for Vela.
	CreateSecretTable = `` /* 346-byte string literal not displayed */

	// CreateSecretTypeOrgRepo represents a query to create an
	// index on the secrets table for the type, org and repo columns.
	CreateSecretTypeOrgRepo = `
CREATE INDEX
IF NOT EXISTS
secrets_type_org_repo
ON secrets (type, org, repo);
`

	// CreateSecretTypeOrgTeam represents a query to create an
	// index on the secrets table for the type, org and team columns.
	CreateSecretTypeOrgTeam = `
CREATE INDEX
IF NOT EXISTS
secrets_type_org_team
ON secrets (type, org, team);
`

	// CreateSecretTypeOrg represents a query to create an
	// index on the secrets table for the type, and org columns.
	CreateSecretTypeOrg = `
CREATE INDEX
IF NOT EXISTS
secrets_type_org
ON secrets (type, org);
`

	// CreateSecretType represents a query to create an
	// index on the secrets table for the type column.
	CreateSecretType = `
CREATE INDEX
IF NOT EXISTS
secrets_type
ON secrets (type);
`
)
View Source
const (
	// CreateServiceTable represents a query to
	// create the services table for Vela.
	CreateServiceTable = `` /* 433-byte string literal not displayed */

	// CreateServiceBuildIDNumberIndex represents a query to create an
	// index on the services table for the build_id and number columns.
	CreateServiceBuildIDNumberIndex = `
CREATE INDEX
IF NOT EXISTS
services_build_id_number
ON services (build_id, number);
`
)
View Source
const (
	// CreateStepTable represents a query to
	// create the steps table for Vela.
	CreateStepTable = `` /* 451-byte string literal not displayed */

	// CreateStepBuildIDNumberIndex represents a query to create an
	// index on the steps table for the build_id and number columns.
	CreateStepBuildIDNumberIndex = `
CREATE INDEX
IF NOT EXISTS
steps_build_id_number
ON steps (build_id, number);
`
)
View Source
const (
	// CreateUserTable represents a query to
	// create the users table for Vela.
	CreateUserTable = `` /* 264-byte string literal not displayed */

	// CreateUserNameIndex represents a query to create an
	// index on the users table for the name column.
	CreateUserNameIndex = `
CREATE INDEX
IF NOT EXISTS
users_name
ON users (name);
`

	// CreateRefreshIndex represents a query to create an
	// index on the users table for the refresh_token column.
	CreateRefreshIndex = `
CREATE INDEX
IF NOT EXISTS
users_refresh
ON users (refresh_token);
`
)
View Source
const (
	// CreateWorkerTable represents a query to
	// create the workers table for Vela.
	CreateWorkerTable = `` /* 255-byte string literal not displayed */

	// CreateWorkersHostnameAddressIndex represents a query to create an
	// index on the workers table for the hostname and address columns.
	CreateWorkersHostnameAddressIndex = `
CREATE INDEX
IF NOT EXISTS
workers_hostname_address
ON workers (hostname, address);
`
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Map

type Map struct {
	BuildService   *Service
	HookService    *Service
	LogService     *Service
	RepoService    *Service
	SecretService  *Service
	ServiceService *Service
	StepService    *Service
	UserService    *Service
	WorkerService  *Service
}

Map represents the Sqlite DDL services in a struct for lookups.

func NewMap

func NewMap() *Map

NewMap returns the Sqlite Map for DDL lookups.

type Service

type Service struct {
	Create  string
	Indexes []string
}

Service represents the Sqlite DDL for a table in the database.

Jump to

Keyboard shortcuts

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