master

package
v0.0.0-...-4fcc4bf Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Overview

Package master contains the sqlite database schema

Index

Constants

This section is empty.

Variables

View Source
var MasterSchema string

MasterSchema is the schema for the main database

Functions

This section is empty.

Types

type DeleteFileByIDParams

type DeleteFileByIDParams struct {
	ID int64 `db:"id" json:"id"`
}

type DeleteHTMLByIDParams

type DeleteHTMLByIDParams struct {
	ID int64 `db:"id" json:"id"`
}

type DeleteLineByIDParams

type DeleteLineByIDParams struct {
	ID int64 `db:"id" json:"id"`
}

type DeleteSelectorByIDParams

type DeleteSelectorByIDParams struct {
	ID int64 `db:"id" json:"id"`
}

type DeleteStructByIDParams

type DeleteStructByIDParams struct {
	ID int64 `db:"id" json:"id"`
}

type DeleteTagByIDParams

type DeleteTagByIDParams struct {
	ID int64 `db:"id" json:"id"`
}

type DeleteURLParams

type DeleteURLParams struct {
	ID int64 `db:"id" json:"id"`
}

type Field

type Field struct {
	ID       int64  `db:"id" json:"id"`
	StructID int64  `db:"struct_id" json:"struct_id"`
	Name     string `db:"name" json:"name"`
	LineID   int64  `db:"line_id" json:"line_id"`
}

type File

type File struct {
	ID        int64      `db:"id" json:"id"`
	Uri       string     `db:"uri" json:"uri"`
	UpdatedAt *time.Time `db:"updated_at" json:"updated_at"`
	CreatedAt *time.Time `db:"created_at" json:"created_at"`
}

type GetFileByIDParams

type GetFileByIDParams struct {
	ID int64 `db:"id" json:"id"`
}

type GetFileByURIParams

type GetFileByURIParams struct {
	Uri string `db:"uri" json:"uri"`
}

type GetHTMLByURLParams

type GetHTMLByURLParams struct {
	Value string `db:"value" json:"value"`
}

type GetLineByIDParams

type GetLineByIDParams struct {
	ID int64 `db:"id" json:"id"`
}

type GetLineByIDRow

type GetLineByIDRow struct {
	ID     int64  `db:"id" json:"id"`
	Value  string `db:"value" json:"value"`
	Number int64  `db:"number" json:"number"`
}

type GetSelectorByIDParams

type GetSelectorByIDParams struct {
	ID int64 `db:"id" json:"id"`
}

type GetSelectorByValueParams

type GetSelectorByValueParams struct {
	Value string `db:"value" json:"value"`
}

type GetSelectorsByContextParams

type GetSelectorsByContextParams struct {
	Context string `db:"context" json:"context"`
}

type GetSelectorsByMinOccurancesParams

type GetSelectorsByMinOccurancesParams struct {
	Occurances int64  `db:"occurances" json:"occurances"`
	Value      string `db:"value" json:"value"`
}

type GetSelectorsByURLParams

type GetSelectorsByURLParams struct {
	Value string `db:"value" json:"value"`
}

type GetStructByIDParams

type GetStructByIDParams struct {
	ID int64 `db:"id" json:"id"`
}

type GetStructByValueParams

type GetStructByValueParams struct {
	Value string `db:"value" json:"value"`
}

type GetStructsByEndLineIDParams

type GetStructsByEndLineIDParams struct {
	EndLineID int64 `db:"end_line_id" json:"end_line_id"`
}

type GetStructsByFileIDAndEndLineIDParams

type GetStructsByFileIDAndEndLineIDParams struct {
	FileID    int64 `db:"file_id" json:"file_id"`
	EndLineID int64 `db:"end_line_id" json:"end_line_id"`
}

type GetStructsByFileIDAndStartLineIDParams

type GetStructsByFileIDAndStartLineIDParams struct {
	FileID      int64 `db:"file_id" json:"file_id"`
	StartLineID int64 `db:"start_line_id" json:"start_line_id"`
}

type GetStructsByFileIDParams

type GetStructsByFileIDParams struct {
	FileID int64 `db:"file_id" json:"file_id"`
}

type GetStructsByStartLineEndlineRangeParams

type GetStructsByStartLineEndlineRangeParams struct {
	Number   int64 `db:"number" json:"number"`
	Number_2 int64 `db:"number_2" json:"number_2"`
}

type GetStructsByStartLineEndlineRangeRow

type GetStructsByStartLineEndlineRangeRow struct {
	ID          int64  `db:"id" json:"id"`
	Value       string `db:"value" json:"value"`
	UrlID       int64  `db:"url_id" json:"url_id"`
	StartLineID int64  `db:"start_line_id" json:"start_line_id"`
	EndLineID   int64  `db:"end_line_id" json:"end_line_id"`
	FileID      int64  `db:"file_id" json:"file_id"`
	Context     string `db:"context" json:"context"`
	ID_2        int64  `db:"id_2" json:"id_2"`
	FileID_2    int64  `db:"file_id_2" json:"file_id_2"`
	Value_2     string `db:"value_2" json:"value_2"`
	Number      int64  `db:"number" json:"number"`
	ID_3        int64  `db:"id_3" json:"id_3"`
	FileID_3    int64  `db:"file_id_3" json:"file_id_3"`
	Value_3     string `db:"value_3" json:"value_3"`
	Number_2    int64  `db:"number_2" json:"number_2"`
}

type GetStructsByStartLineIDParams

type GetStructsByStartLineIDParams struct {
	StartLineID int64 `db:"start_line_id" json:"start_line_id"`
}

type GetStructsByValueParams

type GetStructsByValueParams struct {
	Value string `db:"value" json:"value"`
}

type GetTagByFieldIDAndValueParams

type GetTagByFieldIDAndValueParams struct {
	FieldID int64  `db:"field_id" json:"field_id"`
	Value   string `db:"value" json:"value"`
}

type GetTagByIDParams

type GetTagByIDParams struct {
	ID int64 `db:"id" json:"id"`
}

type GetTagByValueParams

type GetTagByValueParams struct {
	Value string `db:"value" json:"value"`
}

type GetTagsByFieldIDParams

type GetTagsByFieldIDParams struct {
	FieldID int64 `db:"field_id" json:"field_id"`
}

type GetURLByValueParams

type GetURLByValueParams struct {
	Value string `db:"value" json:"value"`
}

type Html

type Html struct {
	ID        int64      `db:"id" json:"id"`
	Value     string     `db:"value" json:"value"`
	UpdatedAt *time.Time `db:"updated_at" json:"updated_at"`
	CreatedAt *time.Time `db:"created_at" json:"created_at"`
}

type InsertFileParams

type InsertFileParams struct {
	Uri string `db:"uri" json:"uri"`
}

type InsertHTMLParams

type InsertHTMLParams struct {
	Value string `db:"value" json:"value"`
}

type InsertLineParams

type InsertLineParams struct {
	Value string `db:"value" json:"value"`
}

type InsertLineRow

type InsertLineRow struct {
	ID     int64  `db:"id" json:"id"`
	Value  string `db:"value" json:"value"`
	Number int64  `db:"number" json:"number"`
}

type InsertSelectorParams

type InsertSelectorParams struct {
	Value      string `db:"value" json:"value"`
	UrlID      int64  `db:"url_id" json:"url_id"`
	Context    string `db:"context" json:"context"`
	Occurances int64  `db:"occurances" json:"occurances"`
}

type InsertStructParams

type InsertStructParams struct {
	FileID      int64  `db:"file_id" json:"file_id"`
	StartLineID int64  `db:"start_line_id" json:"start_line_id"`
	EndLineID   int64  `db:"end_line_id" json:"end_line_id"`
	Value       string `db:"value" json:"value"`
}

type InsertTagParams

type InsertTagParams struct {
	Value   string `db:"value" json:"value"`
	Start   int64  `db:"start" json:"start"`
	End     int64  `db:"end" json:"end"`
	LineID  int64  `db:"line_id" json:"line_id"`
	FieldID int64  `db:"field_id" json:"field_id"`
}

type InsertURLParams

type InsertURLParams struct {
	Value  string `db:"value" json:"value"`
	HtmlID int64  `db:"html_id" json:"html_id"`
}

type Line

type Line struct {
	ID     int64  `db:"id" json:"id"`
	FileID int64  `db:"file_id" json:"file_id"`
	Value  string `db:"value" json:"value"`
	Number int64  `db:"number" json:"number"`
}

type ListAllRow

type ListAllRow struct {
	ID       int64  `db:"id" json:"id"`
	Value    string `db:"value" json:"value"`
	Html     string `db:"html" json:"html"`
	Selector string `db:"selector" json:"selector"`
}

type Queries

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

Queries is the object to use to interact with the database.

func New

func New(db generic.DBTX) *Queries

New creates a new queries type

func (*Queries) DeleteFileByID

func (q *Queries) DeleteFileByID(ctx context.Context, arg DeleteFileByIDParams) error

DeleteFileByID

DELETE FROM
    files
WHERE
    id = ?

func (*Queries) DeleteHTMLByID

func (q *Queries) DeleteHTMLByID(ctx context.Context, arg DeleteHTMLByIDParams) error

DeleteHTMLByID

DELETE FROM
    htmls
WHERE
    id = ?

func (*Queries) DeleteLineByID

func (q *Queries) DeleteLineByID(ctx context.Context, arg DeleteLineByIDParams) error

DeleteLineByID

DELETE FROM
    lines
WHERE
    id = ?

func (*Queries) DeleteSelectorByID

func (q *Queries) DeleteSelectorByID(ctx context.Context, arg DeleteSelectorByIDParams) error

DeleteSelectorByID

DELETE FROM
	selectors
WHERE
	id = ?

func (*Queries) DeleteStructByID

func (q *Queries) DeleteStructByID(ctx context.Context, arg DeleteStructByIDParams) error

DeleteStructByID

DELETE FROM
    structs
WHERE
    id = ?

func (*Queries) DeleteTagByID

func (q *Queries) DeleteTagByID(ctx context.Context, arg DeleteTagByIDParams) error

DeleteTagByID

DELETE FROM
    tags
WHERE
    id = ?

func (*Queries) DeleteURL

func (q *Queries) DeleteURL(ctx context.Context, arg DeleteURLParams) error

DeleteURL

DELETE FROM
    urls
WHERE
    id = ?

func (*Queries) GetFileByID

func (q *Queries) GetFileByID(ctx context.Context, arg GetFileByIDParams) (*File, error)

GetFileByID

SELECT
    id, uri, updated_at, created_at
FROM
    files
WHERE
    id = ? LIMIT 1

func (*Queries) GetFileByURI

func (q *Queries) GetFileByURI(ctx context.Context, arg GetFileByURIParams) (*File, error)

GetFileByURI

SELECT
    id, uri, updated_at, created_at
FROM
    files
WHERE
    uri = ?

func (*Queries) GetHTMLByURL

func (q *Queries) GetHTMLByURL(ctx context.Context, arg GetHTMLByURLParams) (*Html, error)

GetHTMLByURL

SELECT
    htmls.id, htmls.value, htmls.updated_at, htmls.created_at
FROM
    htmls
    JOIN urls ON urls.html_id = htmls.id
WHERE
    urls.value = ?

func (*Queries) GetLineByID

func (q *Queries) GetLineByID(ctx context.Context, arg GetLineByIDParams) (*GetLineByIDRow, error)

GetLineByID

SELECT
    id, value, number
FROM
    lines
WHERE
    id = ?

func (*Queries) GetSelectorByID

func (q *Queries) GetSelectorByID(ctx context.Context, arg GetSelectorByIDParams) (*Selector, error)

GetSelectorByID

SELECT
	id, value, url_id, occurances, context
FROM
	selectors
WHERE
	id = ?

func (*Queries) GetSelectorByValue

func (q *Queries) GetSelectorByValue(ctx context.Context, arg GetSelectorByValueParams) (*Selector, error)

GetSelectorByValue

SELECT
	id, value, url_id, occurances, context
FROM
	selectors
WHERE
	value = ?

func (*Queries) GetSelectorsByContext

func (q *Queries) GetSelectorsByContext(ctx context.Context, arg GetSelectorsByContextParams) ([]*Selector, error)

GetSelectorsByContext

SELECT
	id, value, url_id, occurances, context
FROM
	selectors
WHERE
	context = ?

func (*Queries) GetSelectorsByMinOccurances

func (q *Queries) GetSelectorsByMinOccurances(ctx context.Context, arg GetSelectorsByMinOccurancesParams) ([]*Selector, error)

GetSelectorsByMinOccurances

SELECT
    selectors.id, selectors.value, selectors.url_id, selectors.occurances, selectors.context
FROM
    selectors
    JOIN urls ON urls.id = selectors.url_id
WHERE
    selectors.occurances >= ? AND
    urls.value LIKE ?

func (*Queries) GetSelectorsByURL

func (q *Queries) GetSelectorsByURL(ctx context.Context, arg GetSelectorsByURLParams) ([]*Selector, error)

GetSelectorsByURL

SELECT
	selectors.id, selectors.value, selectors.url_id, selectors.occurances, selectors.context
FROM
	selectors
	JOIN urls ON urls.id = selectors.url_id
WHERE
	urls.value = ?

func (*Queries) GetStructByID

func (q *Queries) GetStructByID(ctx context.Context, arg GetStructByIDParams) (*Struct, error)

GetStructByID

SELECT
    id, value, url_id, start_line_id, end_line_id, file_id, context
FROM
    structs
WHERE
    id = ?

func (*Queries) GetStructByValue

func (q *Queries) GetStructByValue(ctx context.Context, arg GetStructByValueParams) (*Struct, error)

GetStructByValue

SELECT
    id, value, url_id, start_line_id, end_line_id, file_id, context
FROM
    structs
WHERE
    value = ?

func (*Queries) GetStructsByEndLineID

func (q *Queries) GetStructsByEndLineID(ctx context.Context, arg GetStructsByEndLineIDParams) ([]*Struct, error)

GetStructsByEndLineID

SELECT
    id, value, url_id, start_line_id, end_line_id, file_id, context
FROM
    structs
WHERE
    end_line_id = ?

func (*Queries) GetStructsByFileID

func (q *Queries) GetStructsByFileID(ctx context.Context, arg GetStructsByFileIDParams) ([]*Struct, error)

GetStructsByFileID

SELECT
    id, value, url_id, start_line_id, end_line_id, file_id, context
FROM
    structs
WHERE
    file_id = ?

func (*Queries) GetStructsByFileIDAndEndLineID

func (q *Queries) GetStructsByFileIDAndEndLineID(ctx context.Context, arg GetStructsByFileIDAndEndLineIDParams) ([]*Struct, error)

GetStructsByFileIDAndEndLineID

SELECT
    id, value, url_id, start_line_id, end_line_id, file_id, context
FROM
    structs
WHERE
    file_id = ? AND end_line_id = ?

func (*Queries) GetStructsByFileIDAndStartLineID

func (q *Queries) GetStructsByFileIDAndStartLineID(ctx context.Context, arg GetStructsByFileIDAndStartLineIDParams) ([]*Struct, error)

GetStructsByFileIDAndStartLineID

SELECT
    id, value, url_id, start_line_id, end_line_id, file_id, context
FROM
    structs
WHERE
    file_id = ? AND start_line_id = ?

func (*Queries) GetStructsByStartLineEndlineRange

GetStructsByStartLineEndlineRange

SELECT
    structs.id, structs.value, url_id, start_line_id, end_line_id, structs.file_id, context, lines.id, lines.file_id, lines.value, lines.number, lines2.id, lines2.file_id, lines2.value, lines2.number
FROM
    structs
JOIN lines ON lines.id = structs.start_line_id
JOIN lines AS lines2 ON lines2.id = structs.end_line_id
WHERE
    lines.number <= ? AND lines2.number >= ?

func (*Queries) GetStructsByStartLineID

func (q *Queries) GetStructsByStartLineID(ctx context.Context, arg GetStructsByStartLineIDParams) ([]*Struct, error)

GetStructsByStartLineID

SELECT
    id, value, url_id, start_line_id, end_line_id, file_id, context
FROM
    structs
WHERE
    start_line_id = ?

func (*Queries) GetStructsByValue

func (q *Queries) GetStructsByValue(ctx context.Context, arg GetStructsByValueParams) ([]*Struct, error)

GetStructsByValue

SELECT
    id, value, url_id, start_line_id, end_line_id, file_id, context
FROM
    structs
WHERE
    value = ?

func (*Queries) GetTagByFieldIDAndValue

func (q *Queries) GetTagByFieldIDAndValue(ctx context.Context, arg GetTagByFieldIDAndValueParams) (*Tag, error)

GetTagByFieldIDAndValue

SELECT
    id, value, start, "end", line_id, field_id
FROM
    tags
WHERE
    field_id = ? AND value = ?

func (*Queries) GetTagByID

func (q *Queries) GetTagByID(ctx context.Context, arg GetTagByIDParams) (*Tag, error)

GetTagByID

SELECT
    id, value, start, "end", line_id, field_id
FROM
    tags
WHERE
    id = ?

func (*Queries) GetTagByValue

func (q *Queries) GetTagByValue(ctx context.Context, arg GetTagByValueParams) (*Tag, error)

GetTagByValue

SELECT
    id, value, start, "end", line_id, field_id
FROM
    tags
WHERE
    value = ?

func (*Queries) GetTagsByFieldID

func (q *Queries) GetTagsByFieldID(ctx context.Context, arg GetTagsByFieldIDParams) ([]*Tag, error)

GetTagsByFieldID

SELECT
    id, value, start, "end", line_id, field_id
FROM
    tags
WHERE
    field_id = ?

func (*Queries) GetURLByValue

func (q *Queries) GetURLByValue(ctx context.Context, arg GetURLByValueParams) (*Url, error)

GetURLByValue

SELECT
    id, value, html_id
FROM
    urls
WHERE
    value = ?

func (*Queries) InsertFile

func (q *Queries) InsertFile(ctx context.Context, arg InsertFileParams) (*File, error)

InsertFile

INSERT INTO
    files (uri)
VALUES
    (?) RETURNING id, uri, updated_at, created_at

func (*Queries) InsertHTML

func (q *Queries) InsertHTML(ctx context.Context, arg InsertHTMLParams) (*Html, error)

InsertHTML

INSERT OR IGNORE INTO
    htmls (value)
VALUES
    (?) RETURNING id, value, updated_at, created_at

func (*Queries) InsertLine

func (q *Queries) InsertLine(ctx context.Context, arg InsertLineParams) (*InsertLineRow, error)

InsertLine

INSERT INTO
    lines (value)
VALUES
    (?) RETURNING id, value, number

func (*Queries) InsertSelector

func (q *Queries) InsertSelector(ctx context.Context, arg InsertSelectorParams) (*Selector, error)

**************************************************************************** ****************************************************************************

/*
 ** selectors.sql
 ** Description: This file contains the SQLite queries for the selectors table
 ** Dialect: sqlite3
 */
INSERT INTO
	selectors (value, url_id, context, occurances)
VALUES
	(?, ?, ?, ?) RETURNING id, value, url_id, occurances, context

func (*Queries) InsertStruct

func (q *Queries) InsertStruct(ctx context.Context, arg InsertStructParams) (*Struct, error)

InsertStruct

INSERT INTO
    structs (file_id, start_line_id, end_line_id, value)
VALUES
    (?, ?, ?, ?) RETURNING id, value, url_id, start_line_id, end_line_id, file_id, context

func (*Queries) InsertTag

func (q *Queries) InsertTag(ctx context.Context, arg InsertTagParams) error

InsertTag

INSERT INTO
    tags (value, start, end, line_id, field_id)
VALUES
    (?, ?, ?, ?, ?)

func (*Queries) InsertURL

func (q *Queries) InsertURL(ctx context.Context, arg InsertURLParams) (*Url, error)

InsertURL

INSERT OR IGNORE INTO
    urls (value, html_id)
VALUES
    (?, ?) RETURNING id, value, html_id

func (*Queries) ListAll

func (q *Queries) ListAll(ctx context.Context) ([]*ListAllRow, error)

ListAll

SELECT
    urls.id,
    urls.value,
    htmls.value as html,
    selectors.value as selector
FROM
    urls
    JOIN htmls ON urls.html_id = htmls.id
    JOIN selectors ON urls.id = selectors.url_id

func (*Queries) ListFiles

func (q *Queries) ListFiles(ctx context.Context) ([]*File, error)

****************************************************************************

/*
** File: files.sql
** Description: This file contains the SQLite queries for the files table
** Dialect: sqlite3
*/

SELECT
    id, uri, updated_at, created_at
from
    files

func (*Queries) ListHTMLs

func (q *Queries) ListHTMLs(ctx context.Context) ([]*Html, error)

**************************************************************************** ****************************************************************************

/*
 ** File: htmls.sql
 ** Description: This file contains the SQLite queries for the htmls table
 ** Dialect: sqlite3
 */
SELECT
    id, value, updated_at, created_at
from
    htmls

func (*Queries) ListLines

func (q *Queries) ListLines(ctx context.Context) ([]*Line, error)

**************************************************************************** ****************************************************************************

/*
** File: lines.sql
** Description: This file contains the SQLite queries for the lines table
** Dialect: sqlite3
*/

SELECT
    id, file_id, value, number
from
    lines

func (*Queries) ListStructs

func (q *Queries) ListStructs(ctx context.Context) ([]*Struct, error)

**************************************************************************** ****************************************************************************

/*
** File: structs.sql
** Description: This file contains the SQLite queries for the structs table
** Dialect: sqlite3
*/

SELECT
    id, value, url_id, start_line_id, end_line_id, file_id, context
from
    structs

func (*Queries) ListTags

func (q *Queries) ListTags(ctx context.Context) ([]*Tag, error)

**************************************************************************** ****************************************************************************

/*
** File: tags.sql
** Description: This file contains the SQLite queries for the tags table
** Dialect: sqlite3
*/

SELECT
    id, value, start, "end", line_id, field_id
from
    tags

func (*Queries) ListURLs

func (q *Queries) ListURLs(ctx context.Context) ([]*Url, error)

****************************************************************************

/*
 ** File: urls.sql
 ** Description: This file contains the SQLite queries for the urls table
 ** Dialect: sqlite3
 */
SELECT
    id, value, html_id
from
    urls

func (*Queries) UpdateFileByID

func (q *Queries) UpdateFileByID(ctx context.Context, arg UpdateFileByIDParams) (*File, error)

UpdateFileByID

UPDATE
    files
SET
    uri = ?
WHERE
    id = ? RETURNING id, uri, updated_at, created_at

func (*Queries) UpdateHTMLByID

func (q *Queries) UpdateHTMLByID(ctx context.Context, arg UpdateHTMLByIDParams) (*Html, error)

UpdateHTMLByID

UPDATE
    htmls
SET
    value = ?
WHERE
    id = ? RETURNING id, value, updated_at, created_at

func (*Queries) UpdateLineByID

func (q *Queries) UpdateLineByID(ctx context.Context, arg UpdateLineByIDParams) (*UpdateLineByIDRow, error)

UpdateLineByID

UPDATE
    lines
SET
    value = ?
WHERE
    id = ? RETURNING id, value, number

func (*Queries) UpdateSelectorByID

func (q *Queries) UpdateSelectorByID(ctx context.Context, arg UpdateSelectorByIDParams) error

UpdateSelectorByID

UPDATE
	selectors
SET
	value = ?,
	url_id = ?,
	context = ?,
	occurances = ?
WHERE
	id = ?

func (*Queries) UpdateStructByID

func (q *Queries) UpdateStructByID(ctx context.Context, arg UpdateStructByIDParams) (*Struct, error)

UpdateStructByID

UPDATE
    structs
SET
    value = ?,
    start_line_id = ?,
    end_line_id = ?
WHERE
    id = ? RETURNING id, value, url_id, start_line_id, end_line_id, file_id, context

func (*Queries) UpdateTagByID

func (q *Queries) UpdateTagByID(ctx context.Context, arg UpdateTagByIDParams) error

UpdateTagByID

UPDATE
    tags
SET
    value = ?,
    start = ?,
    end = ?,
    line_id = ?,
    field_id = ?
WHERE
    id = ?

func (*Queries) UpdateURL

func (q *Queries) UpdateURL(ctx context.Context, arg UpdateURLParams) error

UpdateURL

UPDATE
    urls
SET
    value = ?,
    html_id = ?
WHERE
    id = ?

func (*Queries) UpsertURL

func (q *Queries) UpsertURL(ctx context.Context, arg UpsertURLParams) (*Url, error)

UpsertURL

INSERT INTO
    urls (value, html_id)
VALUES
    (?, ?)
ON CONFLICT (value)
DO UPDATE
    SET
        html_id = excluded.html_id RETURNING id, value, html_id

func (*Queries) WithTx

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

WithTx creates a new queries type with a transaction.

type Selector

type Selector struct {
	ID         int64  `db:"id" json:"id"`
	Value      string `db:"value" json:"value"`
	UrlID      int64  `db:"url_id" json:"url_id"`
	Occurances int64  `db:"occurances" json:"occurances"`
	Context    string `db:"context" json:"context"`
}

type Struct

type Struct struct {
	ID          int64  `db:"id" json:"id"`
	Value       string `db:"value" json:"value"`
	UrlID       int64  `db:"url_id" json:"url_id"`
	StartLineID int64  `db:"start_line_id" json:"start_line_id"`
	EndLineID   int64  `db:"end_line_id" json:"end_line_id"`
	FileID      int64  `db:"file_id" json:"file_id"`
	Context     string `db:"context" json:"context"`
}

type Tag

type Tag struct {
	ID      int64  `db:"id" json:"id"`
	Value   string `db:"value" json:"value"`
	Start   int64  `db:"start" json:"start"`
	End     int64  `db:"end" json:"end"`
	LineID  int64  `db:"line_id" json:"line_id"`
	FieldID int64  `db:"field_id" json:"field_id"`
}

type UpdateFileByIDParams

type UpdateFileByIDParams struct {
	Uri string `db:"uri" json:"uri"`
	ID  int64  `db:"id" json:"id"`
}

type UpdateHTMLByIDParams

type UpdateHTMLByIDParams struct {
	Value string `db:"value" json:"value"`
	ID    int64  `db:"id" json:"id"`
}

type UpdateLineByIDParams

type UpdateLineByIDParams struct {
	Value string `db:"value" json:"value"`
	ID    int64  `db:"id" json:"id"`
}

type UpdateLineByIDRow

type UpdateLineByIDRow struct {
	ID     int64  `db:"id" json:"id"`
	Value  string `db:"value" json:"value"`
	Number int64  `db:"number" json:"number"`
}

type UpdateSelectorByIDParams

type UpdateSelectorByIDParams struct {
	Value      string `db:"value" json:"value"`
	UrlID      int64  `db:"url_id" json:"url_id"`
	Context    string `db:"context" json:"context"`
	Occurances int64  `db:"occurances" json:"occurances"`
	ID         int64  `db:"id" json:"id"`
}

type UpdateStructByIDParams

type UpdateStructByIDParams struct {
	Value       string `db:"value" json:"value"`
	StartLineID int64  `db:"start_line_id" json:"start_line_id"`
	EndLineID   int64  `db:"end_line_id" json:"end_line_id"`
	ID          int64  `db:"id" json:"id"`
}

type UpdateTagByIDParams

type UpdateTagByIDParams struct {
	Value   string `db:"value" json:"value"`
	Start   int64  `db:"start" json:"start"`
	End     int64  `db:"end" json:"end"`
	LineID  int64  `db:"line_id" json:"line_id"`
	FieldID int64  `db:"field_id" json:"field_id"`
	ID      int64  `db:"id" json:"id"`
}

type UpdateURLParams

type UpdateURLParams struct {
	Value  string `db:"value" json:"value"`
	HtmlID int64  `db:"html_id" json:"html_id"`
	ID     int64  `db:"id" json:"id"`
}

type UpsertURLParams

type UpsertURLParams struct {
	Value  string `db:"value" json:"value"`
	HtmlID int64  `db:"html_id" json:"html_id"`
}

type Url

type Url struct {
	ID     int64  `db:"id" json:"id"`
	Value  string `db:"value" json:"value"`
	HtmlID int64  `db:"html_id" json:"html_id"`
}

Jump to

Keyboard shortcuts

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