codedbsqlc

package
v0.6.1 Latest Latest
Warning

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

Go to latest
Published: Apr 4, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Blob

type Blob struct {
	ID             int64          `json:"id"`
	ContentHash    string         `json:"content_hash"`
	Language       sql.NullString `json:"language"`
	Parsed         int64          `json:"parsed"`
	CommentsParsed int64          `json:"comments_parsed"`
}

type Comment

type Comment struct {
	ID      int64  `json:"id"`
	BlobID  int64  `json:"blob_id"`
	Text    string `json:"text"`
	Kind    string `json:"kind"`
	Line    int64  `json:"line"`
	EndLine int64  `json:"end_line"`
	Col     int64  `json:"col"`
	EndCol  int64  `json:"end_col"`
}

type Commit

type Commit struct {
	ID        int64          `json:"id"`
	RepoID    int64          `json:"repo_id"`
	Hash      string         `json:"hash"`
	Author    sql.NullString `json:"author"`
	Message   sql.NullString `json:"message"`
	Timestamp sql.NullInt64  `json:"timestamp"`
}

type CommitParent

type CommitParent struct {
	CommitID int64 `json:"commit_id"`
	ParentID int64 `json:"parent_id"`
}

type DBTX

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
}

type Diff

type Diff struct {
	ID        int64         `json:"id"`
	CommitID  int64         `json:"commit_id"`
	Path      string        `json:"path"`
	OldBlobID sql.NullInt64 `json:"old_blob_id"`
	NewBlobID sql.NullInt64 `json:"new_blob_id"`
}

type FileRev

type FileRev struct {
	ID       int64  `json:"id"`
	CommitID int64  `json:"commit_id"`
	Path     string `json:"path"`
	BlobID   int64  `json:"blob_id"`
}

type GetDiffIDByCommitPathParams

type GetDiffIDByCommitPathParams struct {
	CommitID int64  `json:"commit_id"`
	Path     string `json:"path"`
}

type GithubFileMtime

type GithubFileMtime struct {
	SourcePath string `json:"source_path"`
	MtimeUnix  int64  `json:"mtime_unix"`
}

type InsertBlobParams

type InsertBlobParams struct {
	ContentHash string         `json:"content_hash"`
	Language    sql.NullString `json:"language"`
}

type InsertCommitParams

type InsertCommitParams struct {
	RepoID    int64          `json:"repo_id"`
	Hash      string         `json:"hash"`
	Author    sql.NullString `json:"author"`
	Message   sql.NullString `json:"message"`
	Timestamp sql.NullInt64  `json:"timestamp"`
}

type InsertCommitParentParams

type InsertCommitParentParams struct {
	CommitID int64 `json:"commit_id"`
	ParentID int64 `json:"parent_id"`
}

type InsertDiffParams

type InsertDiffParams struct {
	CommitID  int64         `json:"commit_id"`
	Path      string        `json:"path"`
	OldBlobID sql.NullInt64 `json:"old_blob_id"`
	NewBlobID sql.NullInt64 `json:"new_blob_id"`
}

type InsertFileRevParams

type InsertFileRevParams struct {
	CommitID int64  `json:"commit_id"`
	Path     string `json:"path"`
	BlobID   int64  `json:"blob_id"`
}

type InsertIssueCommentParams

type InsertIssueCommentParams struct {
	IssueID   int64          `json:"issue_id"`
	Author    sql.NullString `json:"author"`
	Body      sql.NullString `json:"body"`
	CreatedAt sql.NullInt64  `json:"created_at"`
}

type InsertIssueParams

type InsertIssueParams struct {
	Number     int64          `json:"number"`
	Title      string         `json:"title"`
	Body       sql.NullString `json:"body"`
	Author     sql.NullString `json:"author"`
	State      string         `json:"state"`
	Labels     sql.NullString `json:"labels"`
	CreatedAt  sql.NullInt64  `json:"created_at"`
	ClosedAt   sql.NullInt64  `json:"closed_at"`
	UpdatedAt  sql.NullInt64  `json:"updated_at"`
	Url        sql.NullString `json:"url"`
	SourcePath sql.NullString `json:"source_path"`
}

type InsertPRCommentParams

type InsertPRCommentParams struct {
	PrID      int64          `json:"pr_id"`
	Author    sql.NullString `json:"author"`
	Body      sql.NullString `json:"body"`
	Path      sql.NullString `json:"path"`
	Line      sql.NullInt64  `json:"line"`
	CreatedAt sql.NullInt64  `json:"created_at"`
}

type InsertPRCommitParams

type InsertPRCommitParams struct {
	PrID int64  `json:"pr_id"`
	Sha  string `json:"sha"`
}

type InsertPullRequestParams

type InsertPullRequestParams struct {
	Number      int64          `json:"number"`
	Title       string         `json:"title"`
	Body        sql.NullString `json:"body"`
	Author      sql.NullString `json:"author"`
	State       string         `json:"state"`
	Labels      sql.NullString `json:"labels"`
	CreatedAt   sql.NullInt64  `json:"created_at"`
	MergedAt    sql.NullInt64  `json:"merged_at"`
	ClosedAt    sql.NullInt64  `json:"closed_at"`
	UpdatedAt   sql.NullInt64  `json:"updated_at"`
	MergeCommit sql.NullString `json:"merge_commit"`
	Url         sql.NullString `json:"url"`
	SourcePath  sql.NullString `json:"source_path"`
}

type Issue

type Issue struct {
	ID         int64          `json:"id"`
	Number     int64          `json:"number"`
	Title      string         `json:"title"`
	Body       sql.NullString `json:"body"`
	Author     sql.NullString `json:"author"`
	State      string         `json:"state"`
	Labels     sql.NullString `json:"labels"`
	CreatedAt  sql.NullInt64  `json:"created_at"`
	ClosedAt   sql.NullInt64  `json:"closed_at"`
	UpdatedAt  sql.NullInt64  `json:"updated_at"`
	Url        sql.NullString `json:"url"`
	SourcePath sql.NullString `json:"source_path"`
}

type IssueComment

type IssueComment struct {
	ID        int64          `json:"id"`
	IssueID   int64          `json:"issue_id"`
	Author    sql.NullString `json:"author"`
	Body      sql.NullString `json:"body"`
	CreatedAt sql.NullInt64  `json:"created_at"`
}

type ListRefsByRepoRow

type ListRefsByRepoRow struct {
	Name string `json:"name"`
	Hash string `json:"hash"`
}

type PrComment

type PrComment struct {
	ID        int64          `json:"id"`
	PrID      int64          `json:"pr_id"`
	Author    sql.NullString `json:"author"`
	Body      sql.NullString `json:"body"`
	Path      sql.NullString `json:"path"`
	Line      sql.NullInt64  `json:"line"`
	CreatedAt sql.NullInt64  `json:"created_at"`
}

type PrCommit

type PrCommit struct {
	ID   int64  `json:"id"`
	PrID int64  `json:"pr_id"`
	Sha  string `json:"sha"`
}

type PullRequest

type PullRequest struct {
	ID          int64          `json:"id"`
	Number      int64          `json:"number"`
	Title       string         `json:"title"`
	Body        sql.NullString `json:"body"`
	Author      sql.NullString `json:"author"`
	State       string         `json:"state"`
	Labels      sql.NullString `json:"labels"`
	CreatedAt   sql.NullInt64  `json:"created_at"`
	MergedAt    sql.NullInt64  `json:"merged_at"`
	ClosedAt    sql.NullInt64  `json:"closed_at"`
	UpdatedAt   sql.NullInt64  `json:"updated_at"`
	MergeCommit sql.NullString `json:"merge_commit"`
	Url         sql.NullString `json:"url"`
	SourcePath  sql.NullString `json:"source_path"`
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func (*Queries) DeleteFileRevsByCommit

func (q *Queries) DeleteFileRevsByCommit(ctx context.Context, commitID int64) error

func (*Queries) DeleteIssue

func (q *Queries) DeleteIssue(ctx context.Context, id int64) error

func (*Queries) DeleteIssueCommentsByIssue

func (q *Queries) DeleteIssueCommentsByIssue(ctx context.Context, issueID int64) error

func (*Queries) DeletePRCommentsByPR

func (q *Queries) DeletePRCommentsByPR(ctx context.Context, prID int64) error

func (*Queries) DeletePRCommitsByPR

func (q *Queries) DeletePRCommitsByPR(ctx context.Context, prID int64) error

func (*Queries) DeletePullRequest

func (q *Queries) DeletePullRequest(ctx context.Context, id int64) error

func (*Queries) GetBlobIDByHash

func (q *Queries) GetBlobIDByHash(ctx context.Context, contentHash string) (int64, error)

func (*Queries) GetCommitIDByHash

func (q *Queries) GetCommitIDByHash(ctx context.Context, hash string) (int64, error)

func (*Queries) GetDiffIDByCommitPath

func (q *Queries) GetDiffIDByCommitPath(ctx context.Context, arg GetDiffIDByCommitPathParams) (int64, error)

func (*Queries) GetIssueIDByNumber

func (q *Queries) GetIssueIDByNumber(ctx context.Context, number int64) (int64, error)

func (*Queries) GetPRIDByNumber

func (q *Queries) GetPRIDByNumber(ctx context.Context, number int64) (int64, error)

func (*Queries) GetRepoIDByName

func (q *Queries) GetRepoIDByName(ctx context.Context, name string) (int64, error)

func (*Queries) InsertBlob

func (q *Queries) InsertBlob(ctx context.Context, arg InsertBlobParams) error

func (*Queries) InsertCommit

func (q *Queries) InsertCommit(ctx context.Context, arg InsertCommitParams) error

func (*Queries) InsertCommitParent

func (q *Queries) InsertCommitParent(ctx context.Context, arg InsertCommitParentParams) error

func (*Queries) InsertDiff

func (q *Queries) InsertDiff(ctx context.Context, arg InsertDiffParams) error

func (*Queries) InsertFileRev

func (q *Queries) InsertFileRev(ctx context.Context, arg InsertFileRevParams) error

func (*Queries) InsertIssue

func (q *Queries) InsertIssue(ctx context.Context, arg InsertIssueParams) (sql.Result, error)

func (*Queries) InsertIssueComment

func (q *Queries) InsertIssueComment(ctx context.Context, arg InsertIssueCommentParams) error

func (*Queries) InsertPRComment

func (q *Queries) InsertPRComment(ctx context.Context, arg InsertPRCommentParams) error

func (*Queries) InsertPRCommit

func (q *Queries) InsertPRCommit(ctx context.Context, arg InsertPRCommitParams) error

func (*Queries) InsertPullRequest

func (q *Queries) InsertPullRequest(ctx context.Context, arg InsertPullRequestParams) (sql.Result, error)

func (*Queries) ListCommitHashesByRepo

func (q *Queries) ListCommitHashesByRepo(ctx context.Context, repoID int64) ([]string, error)

func (*Queries) ListFileMtimes

func (q *Queries) ListFileMtimes(ctx context.Context) ([]GithubFileMtime, error)

func (*Queries) ListRefsByRepo

func (q *Queries) ListRefsByRepo(ctx context.Context, repoID int64) ([]ListRefsByRepoRow, error)

func (*Queries) ListRepoPaths

func (q *Queries) ListRepoPaths(ctx context.Context) ([]string, error)

func (*Queries) MarkBlobCommentsParsed

func (q *Queries) MarkBlobCommentsParsed(ctx context.Context, id int64) error

func (*Queries) MarkBlobParsed

func (q *Queries) MarkBlobParsed(ctx context.Context, id int64) error

func (*Queries) UpdateSymbolParent

func (q *Queries) UpdateSymbolParent(ctx context.Context, arg UpdateSymbolParentParams) error

func (*Queries) UpsertFileMtime

func (q *Queries) UpsertFileMtime(ctx context.Context, arg UpsertFileMtimeParams) error

func (*Queries) UpsertRef

func (q *Queries) UpsertRef(ctx context.Context, arg UpsertRefParams) error

func (*Queries) UpsertRepo

func (q *Queries) UpsertRepo(ctx context.Context, arg UpsertRepoParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type Ref

type Ref struct {
	ID       int64  `json:"id"`
	RepoID   int64  `json:"repo_id"`
	Name     string `json:"name"`
	CommitID int64  `json:"commit_id"`
}

type Repo

type Repo struct {
	ID   int64  `json:"id"`
	Name string `json:"name"`
	Path string `json:"path"`
}

type Symbol

type Symbol struct {
	ID         int64          `json:"id"`
	BlobID     int64          `json:"blob_id"`
	ParentID   sql.NullInt64  `json:"parent_id"`
	Name       string         `json:"name"`
	Kind       string         `json:"kind"`
	Line       int64          `json:"line"`
	Col        int64          `json:"col"`
	EndLine    sql.NullInt64  `json:"end_line"`
	EndCol     sql.NullInt64  `json:"end_col"`
	Signature  sql.NullString `json:"signature"`
	ReturnType sql.NullString `json:"return_type"`
	Params     sql.NullString `json:"params"`
}

type SymbolRef

type SymbolRef struct {
	ID       int64         `json:"id"`
	BlobID   int64         `json:"blob_id"`
	SymbolID sql.NullInt64 `json:"symbol_id"`
	RefName  string        `json:"ref_name"`
	Kind     string        `json:"kind"`
	Line     int64         `json:"line"`
	Col      int64         `json:"col"`
}

type UpdateSymbolParentParams

type UpdateSymbolParentParams struct {
	ParentID sql.NullInt64 `json:"parent_id"`
	ID       int64         `json:"id"`
}

type UpsertFileMtimeParams

type UpsertFileMtimeParams struct {
	SourcePath string `json:"source_path"`
	MtimeUnix  int64  `json:"mtime_unix"`
}

type UpsertRefParams

type UpsertRefParams struct {
	RepoID   int64  `json:"repo_id"`
	Name     string `json:"name"`
	CommitID int64  `json:"commit_id"`
}

type UpsertRepoParams

type UpsertRepoParams struct {
	Name string `json:"name"`
	Path string `json:"path"`
}

Jump to

Keyboard shortcuts

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