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

Function dbid

internal/dbmanager/client.go:42–48  ·  view source on GitHub ↗
(migrations []string)

Source from the content-addressed store, hash-verified

40}
41
42func dbid(migrations []string) string {
43 h := fnv.New64()
44 for _, query := range migrations {
45 io.WriteString(h, query)
46 }
47 return fmt.Sprintf("%x", h.Sum(nil))
48}
49
50func (m *ManagedClient) CreateDatabase(ctx context.Context, req *CreateDatabaseRequest) (*CreateDatabaseResponse, error) {
51 hash := dbid(req.Migrations)

Callers 1

CreateDatabaseMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected