{"modulePath":"github.com/unity-technologies/migrate","version":"v3.5.4+incompatible","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package spanner\n\n## Constants\n\n```go\nconst DefaultMigrationsTable = \"SchemaMigrations\"\n```\nDefaultMigrationsTable is used if no custom table is specified\n\n## Variables\n\n```go\nvar (\n\tErrNilConfig      = fmt.Errorf(\"no config\")\n\tErrNoDatabaseName = fmt.Errorf(\"no database name\")\n\tErrNoSchema       = fmt.Errorf(\"no schema\")\n\tErrDatabaseDirty  = fmt.Errorf(\"database is dirty\")\n)\n```\nDriver errors\n\n## Functions\n\n```go\nfunc WithInstance(instance *DB, config *Config) (database.Driver, error)\n```\nWithInstance implements database.Driver\n\n## Types\n\n```go\ntype Config struct {\n\tMigrationsTable string\n\tDatabaseName    string\n}\n```\nConfig used for a Spanner instance\n\n```go\ntype DB struct {\n\t// contains filtered or unexported fields\n}\n```\n\n```go\ntype Spanner struct {\n\t// contains filtered or unexported fields\n}\n```\nSpanner implements database.Driver for Google Cloud Spanner\n\n```go\nfunc (s *Spanner) Close() error\n```\nClose implements database.Driver\n\n```go\nfunc (s *Spanner) Drop() error\n```\nDrop implements database.Driver. Retrieves the database schema first and creates statements to drop the indexes and tables accordingly. Note: The drop statements are created in reverse order to how they're provided in the schema. Assuming the schema describes how the database can be \"build up\", it seems logical to \"unbuild\" the database simply by going the opposite direction. More testing\n\n```go\nfunc (s *Spanner) Lock() error\n```\nLock implements database.Driver but doesn't do anything because Spanner only enqueues the UpdateDatabaseDdlRequest.\n\n```go\nfunc (s *Spanner) Open(url string) (database.Driver, error)\n```\nOpen implements database.Driver\n\n```go\nfunc (s *Spanner) Run(migration io.Reader) error\n```\nRun implements database.Driver\n\n```go\nfunc (s *Spanner) SetVersion(version int, dirty bool) error\n```\nSetVersion implements database.Driver\n\n```go\nfunc (s *Spanner) Unlock() error\n```\nUnlock implements database.Driver but no action required, see Lock.\n\n```go\nfunc (s *Spanner) Version() (version int, dirty bool, err error)\n```\nVersion implements database.Driver\n\n","path":"github.com/unity-technologies/migrate/database/spanner","name":"spanner","synopsis":"","isRedistributable":true}
