Skip to content

Commit 8e54855

Browse files
kalbasitclaude
andauthored
fix: add //go:build !js to postgres wrapper to fix tinygo/wasm compilation (#9)
The postgres wrapper imports github.com/lib/pq which uses TLS and crypto APIs unavailable in tinygo's stdlib. Adding the !js build tag excludes the postgres wrapper when building for wasm targets. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 0c497ea commit 8e54855

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

generator/templates.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ var (
5454
`
5555

5656
const wrapperTemplate = `// Code generated by sqlc-multi-db. DO NOT EDIT.
57+
{{- if .Engine.IsPostgres}}
58+
//go:build !js
59+
60+
{{end -}}
5761
package {{.PackageName}}
5862
5963
import (

0 commit comments

Comments
 (0)