metadata

package
v1.80.7 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 23, 2025 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CmdExec       = ":exec"
	CmdExecResult = ":execresult"
	CmdExecRows   = ":execrows"
	CmdExecLastId = ":execlastid"
	CmdMany       = ":many"
	CmdOne        = ":one"
	CmdCopyFrom   = ":copyfrom"
	CmdBatchExec  = ":batchexec"
	CmdBatchMany  = ":batchmany"
	CmdBatchOne   = ":batchone"
)

Variables

This section is empty.

Functions

func ParseQueryNameAndType

func ParseQueryNameAndType(t string, commentStyle CommentSyntax) (string, string, error)

Types

type CommentSyntax

type CommentSyntax source.CommentSyntax

type CommentsMetadata

type CommentsMetadata struct {
	Params  map[string]string
	Flags   map[string]bool
	RetName *string
	// RuleSkiplist contains the names of rules to disable vetting for.
	// If the map is empty, but the disable vet flag is specified, then all rules are ignored.
	RuleSkiplist map[string]struct{}
}

func ParseCommentFlags

func ParseCommentFlags(comments []string) (*CommentsMetadata, error)

ParseCommentFlags processes the comments provided with queries to determine the metadata params, flags and rules to skip. All flags in query comments are prefixed with `@`, e.g. @param, @@sqlc-vet-disable.

type Metadata

type Metadata struct {
	CommentsMetadata
	Name     string
	Cmd      string
	Comments []string

	Filename    string
	PackagePath []string
}

func (*Metadata) UniqName

func (m *Metadata) UniqName() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL