Skip to content
On this page

sqlc Models

go

Generate Go structs matching sqlc naming conventions with sql.Null types

Usage

Add to your sqldoc.config.ts:

typescript
export default {
  dialect: 'postgres',
  schema: ['./schema.sql'],
  codegen: [
    {
      template: 'sqlc',
      output: './generated/models.go',
    },
  ],
}

Then run:

bash
sqldoc codegen