lxd: github.com/lxc/lxd/lxd/db/node Index | Files

package node

import "github.com/lxc/lxd/lxd/db/node"


Package Files

open.go schema.go sqlite.go update.go


const UpdateFromPreClustering = 36

UpdateFromPreClustering is the last schema version where clustering support was not available, and hence no cluster dqlite database is used.


var UpdateFromV16 = updateFromV16

UpdateFromV16 is used by a legacy test in the parent package.

func EnsureSchema Uses

func EnsureSchema(db *sql.DB, dir string, hook schema.Hook) (int, error)

EnsureSchema applies all relevant schema updates to the node-local database.

Return the initial schema version found before starting the update, along with any error occurred.

func FreshSchema Uses

func FreshSchema() string

FreshSchema returns the fresh schema definition of the local database.

func Open Uses

func Open(dir string) (*sql.DB, error)

Open the node-local database object.

func Schema Uses

func Schema() *schema.Schema

Schema for the local database.

func SchemaDotGo Uses

func SchemaDotGo() error

SchemaDotGo refreshes the schema.go file in this package, using the updates defined here.

Package node imports 14 packages (graph) and is imported by 17 packages. Updated 2019-08-23. Refresh now. Tools for package owners.