MCPcopy
hub / github.com/sqlc-dev/sqlc / isInMemoryDatabase

Function isInMemoryDatabase

internal/engine/sqlite/analyzer/analyze.go:325–335  ·  view source on GitHub ↗

isInMemoryDatabase checks if a SQLite URI refers to an in-memory database

(uri string)

Source from the content-addressed store, hash-verified

323
324// isInMemoryDatabase checks if a SQLite URI refers to an in-memory database
325func isInMemoryDatabase(uri string) bool {
326 if uri == ":memory:" || uri == "" {
327 return true
328 }
329 // Check for file URI with mode=memory parameter
330 // e.g., "file:test?mode=memory&cache=shared"
331 if strings.Contains(uri, "mode=memory") {
332 return true
333 }
334 return false
335}
336
337// normalizeType converts SQLite type declarations to standard type names
338func normalizeType(declType string) string {

Callers 2

AnalyzeMethod · 0.85
EnsureConnMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected