lint: convert snake to camel case

This commit is contained in:
2026-10-24 18:56:45 -07:00
parent f8d79761f4
commit ef71828ce2
12 changed files with 100 additions and 101 deletions

View File

@@ -15,12 +15,12 @@ import (
)
//go:embed views.sql
var create_views string
var createViews string
// InitDB creates an in-memory DB from a given schema string.
func InitDB(sql_schema string) *sqlx.DB {
func InitDB(sqlSchema string) *sqlx.DB {
db := sqlx.MustOpen("sqlite3", ":memory:")
db.MustExec(sql_schema)
db.MustExec(sqlSchema)
return db
}
@@ -35,7 +35,7 @@ func SchemaFromSQLFile(filepath string) (Schema, error) {
// SchemaFromDB takes a DB connection, checks its schema metadata tables, and returns a Schema.
func SchemaFromDB(db *sqlx.DB) Schema {
ret := Schema{Tables: map[string]Table{}, Indexes: map[string]Index{}}
db.MustExec(create_views)
db.MustExec(createViews)
var tables []Table
must.Do(db.Select(&tables, `select name, table_type, is_strict, is_without_rowid from tables`))