Skip to content
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
feat: added soft wrapper around some internal functions
  • Loading branch information
paulknebel committed Sep 26, 2025
commit 214dfbc9e59f9c73e84e33b608133cc257ec91ed
26 changes: 4 additions & 22 deletions pkg/api/api.go
Original file line number Diff line number Diff line change
@@ -1,14 +1,7 @@
package api

import (
"bytes"
"context"
"fmt"
"path/filepath"
"regexp"
"strconv"
"strings"
"time"

"github.com/sqlc-dev/sqlc/internal/cmd"
)
Expand All @@ -19,25 +12,14 @@ type Options struct {
Options *cmd.Options
}

type Diagnostic struct {
File string
Line int
Column int
Severity string // "error" | "warning" | "info"
Message string
Raw string
}

type Report struct {
Stdout string
Stderr string
Diagnostics []Diagnostic
}

func Generate(ctx context.Context, opt Options) (map[string]string, error) {
return cmd.Generate(ctx, opt.Dir, opt.Filename, opt.Options)
}

func Verify(ctx context.Context, opt Options) error {
return cmd.Verify(ctx, opt.Dir, opt.Filename, opt.Options)
}

func Vet(ctx context.Context, opt Options) error {
return cmd.Vet(ctx, opt.Dir, opt.Filename, opt.Options)
}
Loading