Documentation
¶
Overview ¶
Package mysql_devserver serves an in-memory Spacewave SQL database over the MySQL wire protocol, so a build-time tool that types queries by preparing them, such as Reylo, asks the same engine a Space's sql/db objects run on.
Index ¶
Constants ¶
const SchemaFileSuffix = ".sql"
SchemaFileSuffix ends the name of each schema file a directory contributes.
Variables ¶
This section is empty.
Functions ¶
func ReadSchemaFiles ¶
ReadSchemaFiles reads the SQL schema at each path in order. A directory contributes its .sql files sorted by name, the order migration files are numbered in; subdirectories are not read. Returns the files read and their texts, in the same order.
Types ¶
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server is a running dev SQL endpoint. Its database is built once from the schema and read-only afterwards: it answers prepares and catalog reads, and any statement that writes fails.
func Start ¶
Start builds database dbName from the schema statements and serves it on lis until Close. It takes ownership of lis.