Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add PrepareContext to Queryer #16

Merged
merged 1 commit into from
Jan 16, 2024
Merged

add PrepareContext to Queryer #16

merged 1 commit into from
Jan 16, 2024

Conversation

pongzu
Copy link
Contributor

@pongzu pongzu commented Jan 16, 2024

qg.Job.Tx()が返すTxerを以下のNew()に渡す際に PrepareContextが必要となるので、追加しました。

// Code generated by sqlc. DO NOT EDIT.

package model

import (
	"context"
	"database/sql"
)

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

func New(db DBTX) *Queries {
	return &Queries{db: db}
}

type Queries struct {
	db DBTX
}

@pongzu pongzu merged commit ffa1dea into master Jan 16, 2024
8 checks passed
@pongzu pongzu deleted the add-prepare-context branch January 16, 2024 11:57
@kanmu kanmu deleted a comment from nakaji-dayo Feb 2, 2024
@kanmu kanmu deleted a comment from pongzu Feb 2, 2024
@kanmu kanmu deleted a comment from pongzu Feb 2, 2024
@kanmu kanmu deleted a comment from nakaji-dayo Feb 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants