// Code generated by server/metadata/lifecyclegen. DO NOT EDIT.

package sqlitelifecyclegen

import (
	"context"
	"database/sql"
)

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
}

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

type Queries struct {
	db DBTX
}

func (q *Queries) WithTx(tx *sql.Tx) *Queries {
	return &Queries{db: tx}
}

const deferForeignKeys = "PRAGMA defer_foreign_keys = ON;"

func (q *Queries) DeferForeignKeys(ctx context.Context) error {
	_, err := q.db.ExecContext(ctx, deferForeignKeys)
	return err
}
