repository

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 6, 2022 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var BookmarkColumns = struct {
	ID             string
	IsRead         string
	Title          string
	URL            string
	BookmarkTypeID string
	IsCollection   string
	CreatedAt      string
	UpdatedAt      string
	DeletedAt      string
}{
	ID:             "id",
	IsRead:         "is_read",
	Title:          "title",
	URL:            "url",
	BookmarkTypeID: "bookmark_type_id",
	IsCollection:   "is_collection",
	CreatedAt:      "created_at",
	UpdatedAt:      "updated_at",
	DeletedAt:      "deleted_at",
}
View Source
var BookmarkFields = struct {
	CreatedAt      BookmarkField
	UpdatedAt      BookmarkField
	URL            BookmarkField
	Title          BookmarkField
	DeletedAt      BookmarkField
	BookmarkTypeID BookmarkField
	IsCollection   BookmarkField
	ID             BookmarkField
	IsRead         BookmarkField
}{
	CreatedAt:      "created_at",
	UpdatedAt:      "updated_at",
	URL:            "url",
	Title:          "title",
	DeletedAt:      "deleted_at",
	BookmarkTypeID: "bookmark_type_id",
	IsCollection:   "is_collection",
	ID:             "id",
	IsRead:         "is_read",
}
View Source
var BookmarkFieldsList = []BookmarkField{
	BookmarkField("CreatedAt"),
	BookmarkField("UpdatedAt"),
	BookmarkField("URL"),
	BookmarkField("Title"),
	BookmarkField("DeletedAt"),
	BookmarkField("BookmarkTypeID"),
	BookmarkField("IsCollection"),
	BookmarkField("ID"),
	BookmarkField("IsRead"),
}
View Source
var BookmarkRelationsList = []string{
	"BookmarkType",
	"Tags",
}
View Source
var BookmarkRels = struct {
	BookmarkType string
	Tags         string
}{
	BookmarkType: "BookmarkType",
	Tags:         "Tags",
}

BookmarkRels is where relationship names are stored.

View Source
var BookmarkTableColumns = struct {
	ID             string
	IsRead         string
	Title          string
	URL            string
	BookmarkTypeID string
	IsCollection   string
	CreatedAt      string
	UpdatedAt      string
	DeletedAt      string
}{
	ID:             "bookmarks.id",
	IsRead:         "bookmarks.is_read",
	Title:          "bookmarks.title",
	URL:            "bookmarks.url",
	BookmarkTypeID: "bookmarks.bookmark_type_id",
	IsCollection:   "bookmarks.is_collection",
	CreatedAt:      "bookmarks.created_at",
	UpdatedAt:      "bookmarks.updated_at",
	DeletedAt:      "bookmarks.deleted_at",
}
View Source
var BookmarkTypeColumns = struct {
	ID           string
	BookmarkType string
}{
	ID:           "id",
	BookmarkType: "bookmark_type",
}
View Source
var BookmarkTypeRels = struct {
	Bookmarks string
}{
	Bookmarks: "Bookmarks",
}

BookmarkTypeRels is where relationship names are stored.

View Source
var BookmarkTypeTableColumns = struct {
	ID           string
	BookmarkType string
}{
	ID:           "bookmark_types.id",
	BookmarkType: "bookmark_types.bookmark_type",
}
View Source
var BookmarkTypeWhere = struct {
	ID           whereHelperint64
	BookmarkType whereHelperstring
}{
	ID:           whereHelperint64{/* contains filtered or unexported fields */},
	BookmarkType: whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var BookmarkWhere = struct {
	ID             whereHelperint64
	IsRead         whereHelperint64
	Title          whereHelpernull_String
	URL            whereHelperstring
	BookmarkTypeID whereHelpernull_Int64
	IsCollection   whereHelperint64
	CreatedAt      whereHelperstring
	UpdatedAt      whereHelperstring
	DeletedAt      whereHelpernull_String
}{
	ID:             whereHelperint64{/* contains filtered or unexported fields */},
	IsRead:         whereHelperint64{/* contains filtered or unexported fields */},
	Title:          whereHelpernull_String{/* contains filtered or unexported fields */},
	URL:            whereHelperstring{/* contains filtered or unexported fields */},
	BookmarkTypeID: whereHelpernull_Int64{/* contains filtered or unexported fields */},
	IsCollection:   whereHelperint64{/* contains filtered or unexported fields */},
	CreatedAt:      whereHelperstring{/* contains filtered or unexported fields */},
	UpdatedAt:      whereHelperstring{/* contains filtered or unexported fields */},
	DeletedAt:      whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var DocumentColumns = struct {
	ID             string
	Path           string
	DocumentTypeID string
	CreatedAt      string
	UpdatedAt      string
	DeletedAt      string
}{
	ID:             "id",
	Path:           "path",
	DocumentTypeID: "document_type_id",
	CreatedAt:      "created_at",
	UpdatedAt:      "updated_at",
	DeletedAt:      "deleted_at",
}
View Source
var DocumentFields = struct {
	CreatedAt      DocumentField
	UpdatedAt      DocumentField
	Path           DocumentField
	DeletedAt      DocumentField
	DocumentTypeID DocumentField
	ID             DocumentField
}{
	CreatedAt:      "created_at",
	UpdatedAt:      "updated_at",
	Path:           "path",
	DeletedAt:      "deleted_at",
	DocumentTypeID: "document_type_id",
	ID:             "id",
}
View Source
var DocumentFieldsList = []DocumentField{
	DocumentField("CreatedAt"),
	DocumentField("UpdatedAt"),
	DocumentField("Path"),
	DocumentField("DeletedAt"),
	DocumentField("DocumentTypeID"),
	DocumentField("ID"),
}
View Source
var DocumentRelationsList = []string{
	"DocumentType",
	"Tags",
	"SourceDocuments",
	"DestinationDocuments",
}
View Source
var DocumentRels = struct {
	DocumentType         string
	Tags                 string
	SourceDocuments      string
	DestinationDocuments string
}{
	DocumentType:         "DocumentType",
	Tags:                 "Tags",
	SourceDocuments:      "SourceDocuments",
	DestinationDocuments: "DestinationDocuments",
}

DocumentRels is where relationship names are stored.

View Source
var DocumentTableColumns = struct {
	ID             string
	Path           string
	DocumentTypeID string
	CreatedAt      string
	UpdatedAt      string
	DeletedAt      string
}{
	ID:             "documents.id",
	Path:           "documents.path",
	DocumentTypeID: "documents.document_type_id",
	CreatedAt:      "documents.created_at",
	UpdatedAt:      "documents.updated_at",
	DeletedAt:      "documents.deleted_at",
}
View Source
var DocumentTypeColumns = struct {
	ID           string
	DocumentType string
}{
	ID:           "id",
	DocumentType: "document_type",
}
View Source
var DocumentTypeRels = struct {
	Documents string
}{
	Documents: "Documents",
}

DocumentTypeRels is where relationship names are stored.

View Source
var DocumentTypeTableColumns = struct {
	ID           string
	DocumentType string
}{
	ID:           "document_types.id",
	DocumentType: "document_types.document_type",
}
View Source
var DocumentTypeWhere = struct {
	ID           whereHelperint64
	DocumentType whereHelperstring
}{
	ID:           whereHelperint64{/* contains filtered or unexported fields */},
	DocumentType: whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var DocumentWhere = struct {
	ID             whereHelperint64
	Path           whereHelperstring
	DocumentTypeID whereHelpernull_Int64
	CreatedAt      whereHelperstring
	UpdatedAt      whereHelperstring
	DeletedAt      whereHelpernull_String
}{
	ID:             whereHelperint64{/* contains filtered or unexported fields */},
	Path:           whereHelperstring{/* contains filtered or unexported fields */},
	DocumentTypeID: whereHelpernull_Int64{/* contains filtered or unexported fields */},
	CreatedAt:      whereHelperstring{/* contains filtered or unexported fields */},
	UpdatedAt:      whereHelperstring{/* contains filtered or unexported fields */},
	DeletedAt:      whereHelpernull_String{/* contains filtered or unexported fields */},
}
View Source
var ErrSyncFail = errors.New("repository: failed to synchronize data after insert")

ErrSyncFail occurs during insert when the record could not be retrieved in order to populate default value information. This usually happens when LastInsertId fails or there was a primary key configuration that was not resolvable.

View Source
var TableNames = struct {
	BookmarkContexts string
	BookmarkTypes    string
	Bookmarks        string
	DocumentContexts string
	DocumentTypes    string
	Documents        string
	Links            string
	Tags             string
}{
	BookmarkContexts: "bookmark_contexts",
	BookmarkTypes:    "bookmark_types",
	Bookmarks:        "bookmarks",
	DocumentContexts: "document_contexts",
	DocumentTypes:    "document_types",
	Documents:        "documents",
	Links:            "links",
	Tags:             "tags",
}
View Source
var TagColumns = struct {
	ID        string
	Tag       string
	ParentTag string
	Path      string
	Children  string
}{
	ID:        "id",
	Tag:       "tag",
	ParentTag: "parent_tag",
	Path:      "path",
	Children:  "children",
}
View Source
var TagFields = struct {
	Tag       TagField
	Path      TagField
	Children  TagField
	ParentTag TagField
	ID        TagField
}{
	Tag:       "tag",
	Path:      "path",
	Children:  "children",
	ParentTag: "parent_tag",
	ID:        "id",
}
View Source
var TagFieldsList = []TagField{
	TagField("Tag"),
	TagField("Path"),
	TagField("Children"),
	TagField("ParentTag"),
	TagField("ID"),
}
View Source
var TagRelationsList = []string{
	"ParentTagTag",
	"Bookmarks",
	"Documents",
	"ParentTagTags",
}
View Source
var TagRels = struct {
	ParentTagTag  string
	Bookmarks     string
	Documents     string
	ParentTagTags string
}{
	ParentTagTag:  "ParentTagTag",
	Bookmarks:     "Bookmarks",
	Documents:     "Documents",
	ParentTagTags: "ParentTagTags",
}

TagRels is where relationship names are stored.

View Source
var TagTableColumns = struct {
	ID        string
	Tag       string
	ParentTag string
	Path      string
	Children  string
}{
	ID:        "tags.id",
	Tag:       "tags.tag",
	ParentTag: "tags.parent_tag",
	Path:      "tags.path",
	Children:  "tags.children",
}
View Source
var TagWhere = struct {
	ID        whereHelperint64
	Tag       whereHelperstring
	ParentTag whereHelpernull_Int64
	Path      whereHelperstring
	Children  whereHelperstring
}{
	ID:        whereHelperint64{/* contains filtered or unexported fields */},
	Tag:       whereHelperstring{/* contains filtered or unexported fields */},
	ParentTag: whereHelpernull_Int64{/* contains filtered or unexported fields */},
	Path:      whereHelperstring{/* contains filtered or unexported fields */},
	Children:  whereHelperstring{/* contains filtered or unexported fields */},
}
View Source
var ViewNames = struct {
}{}

Functions

func AddBookmarkHook

func AddBookmarkHook(hookPoint boil.HookPoint, bookmarkHook BookmarkHook)

AddBookmarkHook registers your hook function for all future operations.

func AddBookmarkTypeHook

func AddBookmarkTypeHook(hookPoint boil.HookPoint, bookmarkTypeHook BookmarkTypeHook)

AddBookmarkTypeHook registers your hook function for all future operations.

func AddDocumentHook

func AddDocumentHook(hookPoint boil.HookPoint, documentHook DocumentHook)

AddDocumentHook registers your hook function for all future operations.

func AddDocumentTypeHook

func AddDocumentTypeHook(hookPoint boil.HookPoint, documentTypeHook DocumentTypeHook)

AddDocumentTypeHook registers your hook function for all future operations.

func AddTagHook

func AddTagHook(hookPoint boil.HookPoint, tagHook TagHook)

AddTagHook registers your hook function for all future operations.

func BookmarkExists

func BookmarkExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

BookmarkExists checks if the Bookmark row exists.

func BookmarkTypeExists

func BookmarkTypeExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

BookmarkTypeExists checks if the BookmarkType row exists.

func BookmarkTypes

func BookmarkTypes(mods ...qm.QueryMod) bookmarkTypeQuery

BookmarkTypes retrieves all the records using an executor.

func Bookmarks

func Bookmarks(mods ...qm.QueryMod) bookmarkQuery

Bookmarks retrieves all the records using an executor.

func DocumentExists

func DocumentExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

DocumentExists checks if the Document row exists.

func DocumentTypeExists

func DocumentTypeExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

DocumentTypeExists checks if the DocumentType row exists.

func DocumentTypes

func DocumentTypes(mods ...qm.QueryMod) documentTypeQuery

DocumentTypes retrieves all the records using an executor.

func Documents

func Documents(mods ...qm.QueryMod) documentQuery

Documents retrieves all the records using an executor.

func IsUnsetOptionalBookmark added in v0.8.0

func IsUnsetOptionalBookmark(o any) bool

func IsUnsetOptionalDocument added in v0.8.0

func IsUnsetOptionalDocument(o any) bool

func IsUnsetOptionalTag added in v0.8.0

func IsUnsetOptionalTag(o any) bool

func NewQuery

func NewQuery(mods ...qm.QueryMod) *queries.Query

NewQuery initializes a new Query using the passed in QueryMods

func TagExists

func TagExists(ctx context.Context, exec boil.ContextExecutor, iD int64) (bool, error)

TagExists checks if the Tag row exists.

func Tags

func Tags(mods ...qm.QueryMod) tagQuery

Tags retrieves all the records using an executor.

func TryUnwrapOptionalBookmark added in v0.8.0

func TryUnwrapOptionalBookmark(o any) any

func TryUnwrapOptionalDocument added in v0.8.0

func TryUnwrapOptionalDocument(o any) any

func TryUnwrapOptionalTag added in v0.8.0

func TryUnwrapOptionalTag(o any) any

Types

type Bookmark

type Bookmark struct {
	L              bookmarkL   `boil:"-" json:"-" toml:"-" yaml:"-"`
	R              *bookmarkR  `boil:"-" json:"-" toml:"-" yaml:"-"`
	CreatedAt      string      `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt      string      `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	URL            string      `boil:"url" json:"url" toml:"url" yaml:"url"`
	Title          null.String `boil:"title" json:"title,omitempty" toml:"title" yaml:"title,omitempty"`
	DeletedAt      null.String `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"`
	BookmarkTypeID null.Int64  `boil:"bookmark_type_id" json:"bookmark_type_id,omitempty" toml:"bookmark_type_id" yaml:"bookmark_type_id,omitempty"`
	IsCollection   int64       `boil:"is_collection" json:"is_collection" toml:"is_collection" yaml:"is_collection"`
	ID             int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
	IsRead         int64       `boil:"is_read" json:"is_read" toml:"is_read" yaml:"is_read"`
}

Bookmark is an object representing the database table.

func FindBookmark

func FindBookmark(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Bookmark, error)

FindBookmark retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Bookmark) AddTags

func (o *Bookmark) AddTags(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Tag) error

AddTags adds the given related objects to the existing relationships of the bookmark, optionally inserting them as new records. Appends related to o.R.Tags. Sets related.R.Bookmarks appropriately.

func (*Bookmark) BookmarkType

func (o *Bookmark) BookmarkType(mods ...qm.QueryMod) bookmarkTypeQuery

BookmarkType pointed to by the foreign key.

func (*Bookmark) Delete

func (o *Bookmark) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Bookmark record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Bookmark) Insert

func (o *Bookmark) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Bookmark) Reload

func (o *Bookmark) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Bookmark) RemoveBookmarkType

func (o *Bookmark) RemoveBookmarkType(ctx context.Context, exec boil.ContextExecutor, related *BookmarkType) error

RemoveBookmarkType relationship. Sets o.R.BookmarkType to nil. Removes o from all passed in related items' relationships struct.

func (*Bookmark) RemoveTags

func (o *Bookmark) RemoveTags(ctx context.Context, exec boil.ContextExecutor, related ...*Tag) error

RemoveTags relationships from objects passed in. Removes related items from R.Tags (uses pointer comparison, removal does not keep order) Sets related.R.Bookmarks.

func (*Bookmark) SetBookmarkType

func (o *Bookmark) SetBookmarkType(ctx context.Context, exec boil.ContextExecutor, insert bool, related *BookmarkType) error

SetBookmarkType of the bookmark to the related item. Sets o.R.BookmarkType to related. Adds o to related.R.Bookmarks.

func (*Bookmark) SetTags

func (o *Bookmark) SetTags(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Tag) error

SetTags removes all previously related items of the bookmark replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Bookmarks's Tags accordingly. Replaces o.R.Tags with related. Sets related.R.Bookmarks's Tags accordingly.

func (*Bookmark) Tags

func (o *Bookmark) Tags(mods ...qm.QueryMod) tagQuery

Tags retrieves all the tag's Tags with an executor.

func (*Bookmark) Update

func (o *Bookmark) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Bookmark. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Bookmark) Upsert

func (o *Bookmark) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type BookmarkField

type BookmarkField string

type BookmarkFilter

type BookmarkFilter struct {
	CreatedAt      optional.Optional[model.FilterOperation[string]]
	UpdatedAt      optional.Optional[model.FilterOperation[string]]
	URL            optional.Optional[model.FilterOperation[string]]
	Title          optional.Optional[model.FilterOperation[null.String]]
	DeletedAt      optional.Optional[model.FilterOperation[null.String]]
	BookmarkTypeID optional.Optional[model.FilterOperation[null.Int64]]
	IsCollection   optional.Optional[model.FilterOperation[int64]]
	ID             optional.Optional[model.FilterOperation[int64]]
	IsRead         optional.Optional[model.FilterOperation[int64]]

	Tags optional.Optional[model.FilterOperation[*Tag]]
}

type BookmarkHook

type BookmarkHook func(context.Context, boil.ContextExecutor, *Bookmark) error

BookmarkHook is the signature for custom Bookmark hook methods

type BookmarkSlice

type BookmarkSlice []*Bookmark

BookmarkSlice is an alias for a slice of pointers to Bookmark. This should almost always be used instead of []Bookmark.

func (BookmarkSlice) DeleteAll

func (o BookmarkSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*BookmarkSlice) ReloadAll

func (o *BookmarkSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (BookmarkSlice) UpdateAll

func (o BookmarkSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type BookmarkType

type BookmarkType struct {
	L            bookmarkTypeL  `boil:"-" json:"-" toml:"-" yaml:"-"`
	R            *bookmarkTypeR `boil:"-" json:"-" toml:"-" yaml:"-"`
	BookmarkType string         `boil:"bookmark_type" json:"bookmark_type" toml:"bookmark_type" yaml:"bookmark_type"`
	ID           int64          `boil:"id" json:"id" toml:"id" yaml:"id"`
}

BookmarkType is an object representing the database table.

func FindBookmarkType

func FindBookmarkType(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*BookmarkType, error)

FindBookmarkType retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*BookmarkType) AddBookmarks

func (o *BookmarkType) AddBookmarks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Bookmark) error

AddBookmarks adds the given related objects to the existing relationships of the bookmark_type, optionally inserting them as new records. Appends related to o.R.Bookmarks. Sets related.R.BookmarkType appropriately.

func (*BookmarkType) Bookmarks

func (o *BookmarkType) Bookmarks(mods ...qm.QueryMod) bookmarkQuery

Bookmarks retrieves all the bookmark's Bookmarks with an executor.

func (*BookmarkType) Delete

func (o *BookmarkType) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single BookmarkType record with an executor. Delete will match against the primary key column to find the record to delete.

func (*BookmarkType) Insert

func (o *BookmarkType) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*BookmarkType) Reload

func (o *BookmarkType) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*BookmarkType) RemoveBookmarks

func (o *BookmarkType) RemoveBookmarks(ctx context.Context, exec boil.ContextExecutor, related ...*Bookmark) error

RemoveBookmarks relationships from objects passed in. Removes related items from R.Bookmarks (uses pointer comparison, removal does not keep order) Sets related.R.BookmarkType.

func (*BookmarkType) SetBookmarks

func (o *BookmarkType) SetBookmarks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Bookmark) error

SetBookmarks removes all previously related items of the bookmark_type replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.BookmarkType's Bookmarks accordingly. Replaces o.R.Bookmarks with related. Sets related.R.BookmarkType's Bookmarks accordingly.

func (*BookmarkType) Update

func (o *BookmarkType) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the BookmarkType. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*BookmarkType) Upsert

func (o *BookmarkType) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type BookmarkTypeHook

type BookmarkTypeHook func(context.Context, boil.ContextExecutor, *BookmarkType) error

BookmarkTypeHook is the signature for custom BookmarkType hook methods

type BookmarkTypeSlice

type BookmarkTypeSlice []*BookmarkType

BookmarkTypeSlice is an alias for a slice of pointers to BookmarkType. This should almost always be used instead of []BookmarkType.

func (BookmarkTypeSlice) DeleteAll

func (o BookmarkTypeSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*BookmarkTypeSlice) ReloadAll

func (o *BookmarkTypeSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (BookmarkTypeSlice) UpdateAll

func (o BookmarkTypeSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type BookmarkUpdater

type BookmarkUpdater struct {
	CreatedAt      optional.Optional[model.UpdateOperation[string]]
	UpdatedAt      optional.Optional[model.UpdateOperation[string]]
	URL            optional.Optional[model.UpdateOperation[string]]
	Title          optional.Optional[model.UpdateOperation[null.String]]
	DeletedAt      optional.Optional[model.UpdateOperation[null.String]]
	BookmarkTypeID optional.Optional[model.UpdateOperation[null.Int64]]
	IsCollection   optional.Optional[model.UpdateOperation[int64]]
	ID             optional.Optional[model.UpdateOperation[int64]]
	IsRead         optional.Optional[model.UpdateOperation[int64]]

	Tags optional.Optional[model.UpdateOperation[TagSlice]]
}

func (*BookmarkUpdater) ApplyToModel

func (updater *BookmarkUpdater) ApplyToModel(bookmarkModel *Bookmark)

func (*BookmarkUpdater) GetSetUpdaters

func (updater *BookmarkUpdater) GetSetUpdaters() *list.List

type BookmarkUpdaterMapping

type BookmarkUpdaterMapping[T any] struct {
	Field   BookmarkField
	Updater model.UpdateOperation[T]
}

type Document

type Document struct {
	L              documentL   `boil:"-" json:"-" toml:"-" yaml:"-"`
	R              *documentR  `boil:"-" json:"-" toml:"-" yaml:"-"`
	CreatedAt      string      `boil:"created_at" json:"created_at" toml:"created_at" yaml:"created_at"`
	UpdatedAt      string      `boil:"updated_at" json:"updated_at" toml:"updated_at" yaml:"updated_at"`
	Path           string      `boil:"path" json:"path" toml:"path" yaml:"path"`
	DeletedAt      null.String `boil:"deleted_at" json:"deleted_at,omitempty" toml:"deleted_at" yaml:"deleted_at,omitempty"`
	DocumentTypeID null.Int64  `boil:"document_type_id" json:"document_type_id,omitempty" toml:"document_type_id" yaml:"document_type_id,omitempty"`
	ID             int64       `boil:"id" json:"id" toml:"id" yaml:"id"`
}

Document is an object representing the database table.

func FindDocument

func FindDocument(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Document, error)

FindDocument retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Document) AddDestinationDocuments

func (o *Document) AddDestinationDocuments(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Document) error

AddDestinationDocuments adds the given related objects to the existing relationships of the document, optionally inserting them as new records. Appends related to o.R.DestinationDocuments. Sets related.R.SourceDocuments appropriately.

func (*Document) AddSourceDocuments

func (o *Document) AddSourceDocuments(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Document) error

AddSourceDocuments adds the given related objects to the existing relationships of the document, optionally inserting them as new records. Appends related to o.R.SourceDocuments. Sets related.R.DestinationDocuments appropriately.

func (*Document) AddTags

func (o *Document) AddTags(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Tag) error

AddTags adds the given related objects to the existing relationships of the document, optionally inserting them as new records. Appends related to o.R.Tags. Sets related.R.Documents appropriately.

func (*Document) Delete

func (o *Document) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Document record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Document) DestinationDocuments

func (o *Document) DestinationDocuments(mods ...qm.QueryMod) documentQuery

DestinationDocuments retrieves all the document's Documents with an executor via id column.

func (*Document) DocumentType

func (o *Document) DocumentType(mods ...qm.QueryMod) documentTypeQuery

DocumentType pointed to by the foreign key.

func (*Document) Insert

func (o *Document) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Document) Reload

func (o *Document) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Document) RemoveDestinationDocuments

func (o *Document) RemoveDestinationDocuments(ctx context.Context, exec boil.ContextExecutor, related ...*Document) error

RemoveDestinationDocuments relationships from objects passed in. Removes related items from R.DestinationDocuments (uses pointer comparison, removal does not keep order) Sets related.R.SourceDocuments.

func (*Document) RemoveDocumentType

func (o *Document) RemoveDocumentType(ctx context.Context, exec boil.ContextExecutor, related *DocumentType) error

RemoveDocumentType relationship. Sets o.R.DocumentType to nil. Removes o from all passed in related items' relationships struct.

func (*Document) RemoveSourceDocuments

func (o *Document) RemoveSourceDocuments(ctx context.Context, exec boil.ContextExecutor, related ...*Document) error

RemoveSourceDocuments relationships from objects passed in. Removes related items from R.SourceDocuments (uses pointer comparison, removal does not keep order) Sets related.R.DestinationDocuments.

func (*Document) RemoveTags

func (o *Document) RemoveTags(ctx context.Context, exec boil.ContextExecutor, related ...*Tag) error

RemoveTags relationships from objects passed in. Removes related items from R.Tags (uses pointer comparison, removal does not keep order) Sets related.R.Documents.

func (*Document) SetDestinationDocuments

func (o *Document) SetDestinationDocuments(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Document) error

SetDestinationDocuments removes all previously related items of the document replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.SourceDocuments's DestinationDocuments accordingly. Replaces o.R.DestinationDocuments with related. Sets related.R.SourceDocuments's DestinationDocuments accordingly.

func (*Document) SetDocumentType

func (o *Document) SetDocumentType(ctx context.Context, exec boil.ContextExecutor, insert bool, related *DocumentType) error

SetDocumentType of the document to the related item. Sets o.R.DocumentType to related. Adds o to related.R.Documents.

func (*Document) SetSourceDocuments

func (o *Document) SetSourceDocuments(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Document) error

SetSourceDocuments removes all previously related items of the document replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.DestinationDocuments's SourceDocuments accordingly. Replaces o.R.SourceDocuments with related. Sets related.R.DestinationDocuments's SourceDocuments accordingly.

func (*Document) SetTags

func (o *Document) SetTags(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Tag) error

SetTags removes all previously related items of the document replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Documents's Tags accordingly. Replaces o.R.Tags with related. Sets related.R.Documents's Tags accordingly.

func (*Document) SourceDocuments

func (o *Document) SourceDocuments(mods ...qm.QueryMod) documentQuery

SourceDocuments retrieves all the document's Documents with an executor via id column.

func (*Document) Tags

func (o *Document) Tags(mods ...qm.QueryMod) tagQuery

Tags retrieves all the tag's Tags with an executor.

func (*Document) Update

func (o *Document) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Document. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Document) Upsert

func (o *Document) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type DocumentField

type DocumentField string

type DocumentFilter

type DocumentFilter struct {
	CreatedAt      optional.Optional[model.FilterOperation[string]]
	UpdatedAt      optional.Optional[model.FilterOperation[string]]
	Path           optional.Optional[model.FilterOperation[string]]
	DeletedAt      optional.Optional[model.FilterOperation[null.String]]
	DocumentTypeID optional.Optional[model.FilterOperation[null.Int64]]
	ID             optional.Optional[model.FilterOperation[int64]]

	Tags                 optional.Optional[model.FilterOperation[*Tag]]
	SourceDocuments      optional.Optional[model.FilterOperation[*Document]]
	DestinationDocuments optional.Optional[model.FilterOperation[*Document]]
}

type DocumentHook

type DocumentHook func(context.Context, boil.ContextExecutor, *Document) error

DocumentHook is the signature for custom Document hook methods

type DocumentSlice

type DocumentSlice []*Document

DocumentSlice is an alias for a slice of pointers to Document. This should almost always be used instead of []Document.

func (DocumentSlice) DeleteAll

func (o DocumentSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*DocumentSlice) ReloadAll

func (o *DocumentSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (DocumentSlice) UpdateAll

func (o DocumentSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type DocumentType

type DocumentType struct {
	L            documentTypeL  `boil:"-" json:"-" toml:"-" yaml:"-"`
	R            *documentTypeR `boil:"-" json:"-" toml:"-" yaml:"-"`
	DocumentType string         `boil:"document_type" json:"document_type" toml:"document_type" yaml:"document_type"`
	ID           int64          `boil:"id" json:"id" toml:"id" yaml:"id"`
}

DocumentType is an object representing the database table.

func FindDocumentType

func FindDocumentType(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*DocumentType, error)

FindDocumentType retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*DocumentType) AddDocuments

func (o *DocumentType) AddDocuments(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Document) error

AddDocuments adds the given related objects to the existing relationships of the document_type, optionally inserting them as new records. Appends related to o.R.Documents. Sets related.R.DocumentType appropriately.

func (*DocumentType) Delete

func (o *DocumentType) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single DocumentType record with an executor. Delete will match against the primary key column to find the record to delete.

func (*DocumentType) Documents

func (o *DocumentType) Documents(mods ...qm.QueryMod) documentQuery

Documents retrieves all the document's Documents with an executor.

func (*DocumentType) Insert

func (o *DocumentType) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*DocumentType) Reload

func (o *DocumentType) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*DocumentType) RemoveDocuments

func (o *DocumentType) RemoveDocuments(ctx context.Context, exec boil.ContextExecutor, related ...*Document) error

RemoveDocuments relationships from objects passed in. Removes related items from R.Documents (uses pointer comparison, removal does not keep order) Sets related.R.DocumentType.

func (*DocumentType) SetDocuments

func (o *DocumentType) SetDocuments(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Document) error

SetDocuments removes all previously related items of the document_type replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.DocumentType's Documents accordingly. Replaces o.R.Documents with related. Sets related.R.DocumentType's Documents accordingly.

func (*DocumentType) Update

func (o *DocumentType) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the DocumentType. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*DocumentType) Upsert

func (o *DocumentType) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type DocumentTypeHook

type DocumentTypeHook func(context.Context, boil.ContextExecutor, *DocumentType) error

DocumentTypeHook is the signature for custom DocumentType hook methods

type DocumentTypeSlice

type DocumentTypeSlice []*DocumentType

DocumentTypeSlice is an alias for a slice of pointers to DocumentType. This should almost always be used instead of []DocumentType.

func (DocumentTypeSlice) DeleteAll

func (o DocumentTypeSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*DocumentTypeSlice) ReloadAll

func (o *DocumentTypeSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (DocumentTypeSlice) UpdateAll

func (o DocumentTypeSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type DocumentUpdater

type DocumentUpdater struct {
	CreatedAt      optional.Optional[model.UpdateOperation[string]]
	UpdatedAt      optional.Optional[model.UpdateOperation[string]]
	Path           optional.Optional[model.UpdateOperation[string]]
	DeletedAt      optional.Optional[model.UpdateOperation[null.String]]
	DocumentTypeID optional.Optional[model.UpdateOperation[null.Int64]]
	ID             optional.Optional[model.UpdateOperation[int64]]

	Tags                 optional.Optional[model.UpdateOperation[TagSlice]]
	SourceDocuments      optional.Optional[model.UpdateOperation[DocumentSlice]]
	DestinationDocuments optional.Optional[model.UpdateOperation[DocumentSlice]]
}

func (*DocumentUpdater) ApplyToModel

func (updater *DocumentUpdater) ApplyToModel(documentModel *Document)

func (*DocumentUpdater) GetSetUpdaters

func (updater *DocumentUpdater) GetSetUpdaters() *list.List

type DocumentUpdaterMapping

type DocumentUpdaterMapping[T any] struct {
	Field   DocumentField
	Updater model.UpdateOperation[T]
}

type M

type M map[string]interface{}

M type is for providing columns and column values to UpdateAll.

type Sqlite3BookmarkRepository

type Sqlite3BookmarkRepository struct {
	Logger *log.Logger
	// contains filtered or unexported fields
}

******************************************************************//

Types and constants                       //

******************************************************************//

func (*Sqlite3BookmarkRepository) Add

func (repo *Sqlite3BookmarkRepository) Add(ctx context.Context, domainModels []*domain.Bookmark) (err error)

******************************************************************//

Methods                             //

******************************************************************//

func (*Sqlite3BookmarkRepository) AddMinimal added in v0.6.0

func (repo *Sqlite3BookmarkRepository) AddMinimal(ctx context.Context, domainModels []*domain.Bookmark, tx *sql.Tx) (err error)

func (*Sqlite3BookmarkRepository) AddType

func (repo *Sqlite3BookmarkRepository) AddType(ctx context.Context, types []string) (err error)

func (*Sqlite3BookmarkRepository) BookmarkDomainToRepositoryFilter added in v0.6.0

func (repo *Sqlite3BookmarkRepository) BookmarkDomainToRepositoryFilter(ctx context.Context, domainFilter *domain.BookmarkFilter) (repositoryFilter any, err error)

func (*Sqlite3BookmarkRepository) BookmarkDomainToRepositoryModel added in v0.6.0

func (repo *Sqlite3BookmarkRepository) BookmarkDomainToRepositoryModel(ctx context.Context, domainModel *domain.Bookmark) (repositoryModel any, err error)

func (*Sqlite3BookmarkRepository) BookmarkDomainToRepositoryModelMinimal added in v0.6.0

func (repo *Sqlite3BookmarkRepository) BookmarkDomainToRepositoryModelMinimal(ctx context.Context, domainModel *domain.Bookmark) (repositoryModel any, err error)

func (*Sqlite3BookmarkRepository) BookmarkDomainToRepositoryModelMinimalTx added in v0.6.0

func (repo *Sqlite3BookmarkRepository) BookmarkDomainToRepositoryModelMinimalTx(ctx context.Context, tx *sql.Tx, domainModel *domain.Bookmark) (repositoryModel any, err error)

func (*Sqlite3BookmarkRepository) BookmarkDomainToRepositoryModelTx added in v0.6.0

func (repo *Sqlite3BookmarkRepository) BookmarkDomainToRepositoryModelTx(ctx context.Context, tx *sql.Tx, domainModel *domain.Bookmark) (repositoryModel any, err error)

func (*Sqlite3BookmarkRepository) BookmarkDomainToRepositoryUpdater added in v0.6.0

func (repo *Sqlite3BookmarkRepository) BookmarkDomainToRepositoryUpdater(ctx context.Context, domainUpdater *domain.BookmarkUpdater) (repositoryUpdater any, err error)

func (*Sqlite3BookmarkRepository) BookmarkRepositoryToDomainModel added in v0.6.0

func (repo *Sqlite3BookmarkRepository) BookmarkRepositoryToDomainModel(ctx context.Context, repositoryModel any) (domainModel *domain.Bookmark, err error)

func (*Sqlite3BookmarkRepository) BookmarkRepositoryToDomainModelTx added in v0.6.0

func (repo *Sqlite3BookmarkRepository) BookmarkRepositoryToDomainModelTx(ctx context.Context, tx *sql.Tx, repositoryModel any) (domainModel *domain.Bookmark, err error)

func (*Sqlite3BookmarkRepository) CountAll

func (repo *Sqlite3BookmarkRepository) CountAll(ctx context.Context) (numRecords int64, err error)

func (*Sqlite3BookmarkRepository) CountWhere

func (repo *Sqlite3BookmarkRepository) CountWhere(ctx context.Context, domainColumnFilter *domain.BookmarkFilter) (numRecords int64, err error)

func (*Sqlite3BookmarkRepository) Delete

func (repo *Sqlite3BookmarkRepository) Delete(ctx context.Context, domainModels []*domain.Bookmark) (err error)

func (*Sqlite3BookmarkRepository) DeleteType

func (repo *Sqlite3BookmarkRepository) DeleteType(ctx context.Context, types []string) (err error)

func (*Sqlite3BookmarkRepository) DeleteWhere

func (repo *Sqlite3BookmarkRepository) DeleteWhere(ctx context.Context, domainColumnFilter *domain.BookmarkFilter) (numAffectedRecords int64, err error)

func (*Sqlite3BookmarkRepository) DoesExist

func (repo *Sqlite3BookmarkRepository) DoesExist(ctx context.Context, domainModel *domain.Bookmark) (doesExist bool, err error)

func (*Sqlite3BookmarkRepository) DoesExistWhere

func (repo *Sqlite3BookmarkRepository) DoesExistWhere(ctx context.Context, domainColumnFilter *domain.BookmarkFilter) (doesExist bool, err error)

func (*Sqlite3BookmarkRepository) GetAll

func (repo *Sqlite3BookmarkRepository) GetAll(ctx context.Context) (records []*domain.Bookmark, err error)

func (*Sqlite3BookmarkRepository) GetAllTypes added in v0.6.0

func (repo *Sqlite3BookmarkRepository) GetAllTypes(ctx context.Context) (records []string, err error)

func (*Sqlite3BookmarkRepository) GetBookmarkDomainToRepositoryModel added in v0.6.0

func (repo *Sqlite3BookmarkRepository) GetBookmarkDomainToRepositoryModel(ctx context.Context) func(domainModel *domain.Bookmark) (repositoryModel any, err error)

******************************************************************//

Converters                            //

******************************************************************//

func (*Sqlite3BookmarkRepository) GetBookmarkDomainToRepositoryModelMinimal added in v0.6.0

func (repo *Sqlite3BookmarkRepository) GetBookmarkDomainToRepositoryModelMinimal(ctx context.Context) func(domainModel *domain.Bookmark) (repositoryModel any, err error)

func (*Sqlite3BookmarkRepository) GetBookmarkDomainToRepositoryModelMinimalTx added in v0.6.0

func (repo *Sqlite3BookmarkRepository) GetBookmarkDomainToRepositoryModelMinimalTx(ctx context.Context, tx *sql.Tx) func(domainModel *domain.Bookmark) (repositoryModel any, err error)

func (*Sqlite3BookmarkRepository) GetBookmarkDomainToRepositoryModelTx added in v0.6.0

func (repo *Sqlite3BookmarkRepository) GetBookmarkDomainToRepositoryModelTx(ctx context.Context, tx *sql.Tx) func(domainModel *domain.Bookmark) (repositoryModel any, err error)

func (*Sqlite3BookmarkRepository) GetBookmarkRepositoryToDomainModel added in v0.6.0

func (repo *Sqlite3BookmarkRepository) GetBookmarkRepositoryToDomainModel(ctx context.Context) func(repositoryModel any) (domainModel *domain.Bookmark, err error)

func (*Sqlite3BookmarkRepository) GetBookmarkRepositoryToDomainModelTx added in v0.6.0

func (repo *Sqlite3BookmarkRepository) GetBookmarkRepositoryToDomainModelTx(ctx context.Context, tx *sql.Tx) func(repositoryModel any) (domainModel *domain.Bookmark, err error)

func (*Sqlite3BookmarkRepository) GetFirstWhere

func (repo *Sqlite3BookmarkRepository) GetFirstWhere(ctx context.Context, domainColumnFilter *domain.BookmarkFilter) (record *domain.Bookmark, err error)

func (*Sqlite3BookmarkRepository) GetFromIDs added in v0.6.0

func (repo *Sqlite3BookmarkRepository) GetFromIDs(ctx context.Context, IDs []int64) (records []*domain.Bookmark, err error)

func (*Sqlite3BookmarkRepository) GetTagRepository added in v0.6.0

func (repo *Sqlite3BookmarkRepository) GetTagRepository() repoCommon.TagRepository

func (*Sqlite3BookmarkRepository) GetWhere

func (repo *Sqlite3BookmarkRepository) GetWhere(ctx context.Context, domainColumnFilter *domain.BookmarkFilter) (records []*domain.Bookmark, err error)

func (*Sqlite3BookmarkRepository) LoadEntityRelations added in v0.6.0

func (repo *Sqlite3BookmarkRepository) LoadEntityRelations(ctx context.Context, tx *sql.Tx, repoModel *Bookmark) (err error)

PERF: This can probably be sped up by not using singular mode

func (*Sqlite3BookmarkRepository) New

func (repo *Sqlite3BookmarkRepository) New(args any) (newRepo repoCommon.BookmarkRepository, err error)

func (*Sqlite3BookmarkRepository) Replace

func (repo *Sqlite3BookmarkRepository) Replace(ctx context.Context, domainModels []*domain.Bookmark) (err error)

func (*Sqlite3BookmarkRepository) ReplaceTx added in v0.6.0

func (repo *Sqlite3BookmarkRepository) ReplaceTx(ctx context.Context, domainModels []*domain.Bookmark, tx *sql.Tx) (err error)

func (*Sqlite3BookmarkRepository) Update

func (repo *Sqlite3BookmarkRepository) Update(ctx context.Context, domainModels []*domain.Bookmark, domainColumnUpdater *domain.BookmarkUpdater) (err error)

func (*Sqlite3BookmarkRepository) UpdateRelatedEntities added in v0.6.0

func (repo *Sqlite3BookmarkRepository) UpdateRelatedEntities(ctx context.Context, tx *sql.Tx, repositoryModel *Bookmark) error

func (*Sqlite3BookmarkRepository) UpdateType

func (repo *Sqlite3BookmarkRepository) UpdateType(ctx context.Context, oldType string, newType string) (err error)

func (*Sqlite3BookmarkRepository) UpdateWhere

func (repo *Sqlite3BookmarkRepository) UpdateWhere(ctx context.Context, domainColumnFilter *domain.BookmarkFilter, domainColumnUpdater *domain.BookmarkUpdater) (numAffectedRecords int64, err error)

func (*Sqlite3BookmarkRepository) Upsert

func (repo *Sqlite3BookmarkRepository) Upsert(ctx context.Context, domainModels []*domain.Bookmark) (err error)

type Sqlite3BookmarkRepositoryConstructorArgs

type Sqlite3BookmarkRepositoryConstructorArgs struct {
	DB     *sql.DB
	Logger *log.Logger

	TagRepository repoCommon.TagRepository
}

type Sqlite3DocumentRepository

type Sqlite3DocumentRepository struct {
	Logger *log.Logger
	// contains filtered or unexported fields
}

******************************************************************//

Types and constants                       //

******************************************************************//

func (*Sqlite3DocumentRepository) Add

func (repo *Sqlite3DocumentRepository) Add(ctx context.Context, domainModels []*domain.Document) (err error)

******************************************************************//

Methods                             //

******************************************************************//

func (*Sqlite3DocumentRepository) AddMinimal added in v0.6.0

func (repo *Sqlite3DocumentRepository) AddMinimal(ctx context.Context, domainModels []*domain.Document, tx *sql.Tx) (err error)

func (*Sqlite3DocumentRepository) AddType

func (repo *Sqlite3DocumentRepository) AddType(ctx context.Context, types []string) (err error)

func (*Sqlite3DocumentRepository) CountAll

func (repo *Sqlite3DocumentRepository) CountAll(ctx context.Context) (numRecords int64, err error)

func (*Sqlite3DocumentRepository) CountWhere

func (repo *Sqlite3DocumentRepository) CountWhere(ctx context.Context, domainColumnFilter *domain.DocumentFilter) (numRecords int64, err error)

func (*Sqlite3DocumentRepository) Delete

func (repo *Sqlite3DocumentRepository) Delete(ctx context.Context, domainModels []*domain.Document) (err error)

func (*Sqlite3DocumentRepository) DeleteType

func (repo *Sqlite3DocumentRepository) DeleteType(ctx context.Context, types []string) (err error)

func (*Sqlite3DocumentRepository) DeleteWhere

func (repo *Sqlite3DocumentRepository) DeleteWhere(ctx context.Context, domainColumnFilter *domain.DocumentFilter) (numAffectedRecords int64, err error)

func (*Sqlite3DocumentRepository) DocumentDomainToRepositoryFilter added in v0.6.0

func (repo *Sqlite3DocumentRepository) DocumentDomainToRepositoryFilter(ctx context.Context, domainFilter *domain.DocumentFilter) (repositoryFilter any, err error)

func (*Sqlite3DocumentRepository) DocumentDomainToRepositoryModel added in v0.6.0

func (repo *Sqlite3DocumentRepository) DocumentDomainToRepositoryModel(ctx context.Context, domainModel *domain.Document) (repositoryModel any, err error)

func (*Sqlite3DocumentRepository) DocumentDomainToRepositoryModelMinimal added in v0.6.0

func (repo *Sqlite3DocumentRepository) DocumentDomainToRepositoryModelMinimal(ctx context.Context, domainModel *domain.Document) (repositoryModel any, err error)

func (*Sqlite3DocumentRepository) DocumentDomainToRepositoryModelMinimalTx added in v0.6.0

func (repo *Sqlite3DocumentRepository) DocumentDomainToRepositoryModelMinimalTx(ctx context.Context, tx *sql.Tx, domainModel *domain.Document) (repositoryModel any, err error)

func (*Sqlite3DocumentRepository) DocumentDomainToRepositoryModelTx added in v0.6.0

func (repo *Sqlite3DocumentRepository) DocumentDomainToRepositoryModelTx(ctx context.Context, tx *sql.Tx, domainModel *domain.Document) (repositoryModel any, err error)

func (*Sqlite3DocumentRepository) DocumentDomainToRepositoryUpdater added in v0.6.0

func (repo *Sqlite3DocumentRepository) DocumentDomainToRepositoryUpdater(ctx context.Context, domainUpdater *domain.DocumentUpdater) (repositoryUpdater any, err error)

func (*Sqlite3DocumentRepository) DocumentRepositoryToDomainModel added in v0.6.0

func (repo *Sqlite3DocumentRepository) DocumentRepositoryToDomainModel(ctx context.Context, repositoryModel any) (domainModel *domain.Document, err error)

func (*Sqlite3DocumentRepository) DocumentRepositoryToDomainModelTx added in v0.6.0

func (repo *Sqlite3DocumentRepository) DocumentRepositoryToDomainModelTx(ctx context.Context, tx *sql.Tx, repositoryModel any) (domainModel *domain.Document, err error)

func (*Sqlite3DocumentRepository) DoesExist

func (repo *Sqlite3DocumentRepository) DoesExist(ctx context.Context, domainModel *domain.Document) (doesExist bool, err error)

func (*Sqlite3DocumentRepository) DoesExistWhere

func (repo *Sqlite3DocumentRepository) DoesExistWhere(ctx context.Context, domainColumnFilter *domain.DocumentFilter) (doesExist bool, err error)

func (*Sqlite3DocumentRepository) GetAll

func (repo *Sqlite3DocumentRepository) GetAll(ctx context.Context) (records []*domain.Document, err error)

func (*Sqlite3DocumentRepository) GetAllTypes added in v0.6.0

func (repo *Sqlite3DocumentRepository) GetAllTypes(ctx context.Context) (records []string, err error)

func (*Sqlite3DocumentRepository) GetDocumentDomainToRepositoryModel added in v0.6.0

func (repo *Sqlite3DocumentRepository) GetDocumentDomainToRepositoryModel(ctx context.Context) func(domainModel *domain.Document) (repositoryModel any, err error)

******************************************************************//

Converters                            //

******************************************************************//

func (*Sqlite3DocumentRepository) GetDocumentDomainToRepositoryModelMinimal added in v0.6.0

func (repo *Sqlite3DocumentRepository) GetDocumentDomainToRepositoryModelMinimal(ctx context.Context) func(domainModel *domain.Document) (repositoryModel any, err error)

func (*Sqlite3DocumentRepository) GetDocumentDomainToRepositoryModelMinimalTx added in v0.6.0

func (repo *Sqlite3DocumentRepository) GetDocumentDomainToRepositoryModelMinimalTx(ctx context.Context, tx *sql.Tx) func(domainModel *domain.Document) (repositoryModel any, err error)

func (*Sqlite3DocumentRepository) GetDocumentDomainToRepositoryModelTx added in v0.6.0

func (repo *Sqlite3DocumentRepository) GetDocumentDomainToRepositoryModelTx(ctx context.Context, tx *sql.Tx) func(domainModel *domain.Document) (repositoryModel any, err error)

func (*Sqlite3DocumentRepository) GetDocumentRepositoryToDomainModel added in v0.6.0

func (repo *Sqlite3DocumentRepository) GetDocumentRepositoryToDomainModel(ctx context.Context) func(repositoryModel any) (domainModel *domain.Document, err error)

func (*Sqlite3DocumentRepository) GetDocumentRepositoryToDomainModelTx added in v0.6.0

func (repo *Sqlite3DocumentRepository) GetDocumentRepositoryToDomainModelTx(ctx context.Context, tx *sql.Tx) func(repositoryModel any) (domainModel *domain.Document, err error)

func (*Sqlite3DocumentRepository) GetFirstWhere

func (repo *Sqlite3DocumentRepository) GetFirstWhere(ctx context.Context, domainColumnFilter *domain.DocumentFilter) (record *domain.Document, err error)

func (*Sqlite3DocumentRepository) GetFromIDs added in v0.6.0

func (repo *Sqlite3DocumentRepository) GetFromIDs(ctx context.Context, IDs []int64) (records []*domain.Document, err error)

func (*Sqlite3DocumentRepository) GetTagRepository added in v0.6.0

func (repo *Sqlite3DocumentRepository) GetTagRepository() repoCommon.TagRepository

func (*Sqlite3DocumentRepository) GetWhere

func (repo *Sqlite3DocumentRepository) GetWhere(ctx context.Context, domainColumnFilter *domain.DocumentFilter) (records []*domain.Document, err error)

func (*Sqlite3DocumentRepository) LoadEntityRelations added in v0.6.0

func (repo *Sqlite3DocumentRepository) LoadEntityRelations(ctx context.Context, tx *sql.Tx, repoModel *Document) (err error)

PERF: This can probably be sped up by not using singular mode

func (*Sqlite3DocumentRepository) New

func (repo *Sqlite3DocumentRepository) New(args any) (newRepo repoCommon.DocumentRepository, err error)

func (*Sqlite3DocumentRepository) Replace

func (repo *Sqlite3DocumentRepository) Replace(ctx context.Context, domainModels []*domain.Document) (err error)

func (*Sqlite3DocumentRepository) ReplaceTx added in v0.6.0

func (repo *Sqlite3DocumentRepository) ReplaceTx(ctx context.Context, domainModels []*domain.Document, tx *sql.Tx) (err error)

func (*Sqlite3DocumentRepository) Update

func (repo *Sqlite3DocumentRepository) Update(ctx context.Context, domainModels []*domain.Document, domainColumnUpdater *domain.DocumentUpdater) (err error)

func (*Sqlite3DocumentRepository) UpdateRelatedEntities added in v0.6.0

func (repo *Sqlite3DocumentRepository) UpdateRelatedEntities(ctx context.Context, tx *sql.Tx, repositoryModel *Document) error

func (*Sqlite3DocumentRepository) UpdateType

func (repo *Sqlite3DocumentRepository) UpdateType(ctx context.Context, oldType string, newType string) (err error)

func (*Sqlite3DocumentRepository) UpdateWhere

func (repo *Sqlite3DocumentRepository) UpdateWhere(ctx context.Context, domainColumnFilter *domain.DocumentFilter, domainColumnUpdater *domain.DocumentUpdater) (numAffectedRecords int64, err error)

func (*Sqlite3DocumentRepository) Upsert

func (repo *Sqlite3DocumentRepository) Upsert(ctx context.Context, domainModels []*domain.Document) (err error)

type Sqlite3DocumentRepositoryConstructorArgs

type Sqlite3DocumentRepositoryConstructorArgs struct {
	DB     *sql.DB
	Logger *log.Logger

	TagRepository repoCommon.TagRepository
}

type Sqlite3TagRepository

type Sqlite3TagRepository struct {
	Logger *log.Logger
	// contains filtered or unexported fields
}

******************************************************************//

Types and constants                       //

******************************************************************//

func (*Sqlite3TagRepository) Add

func (repo *Sqlite3TagRepository) Add(ctx context.Context, domainModels []*domain.Tag) (err error)

******************************************************************//

Methods                             //

******************************************************************//

func (*Sqlite3TagRepository) AddMinimal added in v0.6.0

func (repo *Sqlite3TagRepository) AddMinimal(ctx context.Context, domainModels []*domain.Tag, tx *sql.Tx) (err error)

func (*Sqlite3TagRepository) CountAll

func (repo *Sqlite3TagRepository) CountAll(ctx context.Context) (numRecords int64, err error)

func (*Sqlite3TagRepository) CountWhere

func (repo *Sqlite3TagRepository) CountWhere(ctx context.Context, domainColumnFilter *domain.TagFilter) (numRecords int64, err error)

func (*Sqlite3TagRepository) Delete

func (repo *Sqlite3TagRepository) Delete(ctx context.Context, domainModels []*domain.Tag) (err error)

func (*Sqlite3TagRepository) DeleteWhere

func (repo *Sqlite3TagRepository) DeleteWhere(ctx context.Context, domainColumnFilter *domain.TagFilter) (numAffectedRecords int64, err error)

func (*Sqlite3TagRepository) DoesExist

func (repo *Sqlite3TagRepository) DoesExist(ctx context.Context, domainModel *domain.Tag) (doesExist bool, err error)

func (*Sqlite3TagRepository) DoesExistWhere

func (repo *Sqlite3TagRepository) DoesExistWhere(ctx context.Context, domainColumnFilter *domain.TagFilter) (doesExist bool, err error)

func (*Sqlite3TagRepository) GetAll

func (repo *Sqlite3TagRepository) GetAll(ctx context.Context) (records []*domain.Tag, err error)

func (*Sqlite3TagRepository) GetFirstWhere

func (repo *Sqlite3TagRepository) GetFirstWhere(ctx context.Context, domainColumnFilter *domain.TagFilter) (record *domain.Tag, err error)

func (*Sqlite3TagRepository) GetFromIDs added in v0.6.0

func (repo *Sqlite3TagRepository) GetFromIDs(ctx context.Context, IDs []int64) (records []*domain.Tag, err error)

func (*Sqlite3TagRepository) GetTagDomainToRepositoryModel added in v0.6.0

func (repo *Sqlite3TagRepository) GetTagDomainToRepositoryModel(ctx context.Context) func(domainModel *domain.Tag) (repositoryModel any, err error)

******************************************************************//

Converters                            //

******************************************************************//

func (*Sqlite3TagRepository) GetTagDomainToRepositoryModelMinimal added in v0.6.0

func (repo *Sqlite3TagRepository) GetTagDomainToRepositoryModelMinimal(ctx context.Context) func(domainModel *domain.Tag) (repositoryModel any, err error)

func (*Sqlite3TagRepository) GetTagDomainToRepositoryModelMinimalTx added in v0.6.0

func (repo *Sqlite3TagRepository) GetTagDomainToRepositoryModelMinimalTx(ctx context.Context, tx *sql.Tx) func(domainModel *domain.Tag) (repositoryModel any, err error)

func (*Sqlite3TagRepository) GetTagDomainToRepositoryModelTx added in v0.6.0

func (repo *Sqlite3TagRepository) GetTagDomainToRepositoryModelTx(ctx context.Context, tx *sql.Tx) func(domainModel *domain.Tag) (repositoryModel any, err error)

func (*Sqlite3TagRepository) GetTagRepositoryToDomainModel added in v0.6.0

func (repo *Sqlite3TagRepository) GetTagRepositoryToDomainModel(ctx context.Context) func(repositoryModel any) (domainModel *domain.Tag, err error)

func (*Sqlite3TagRepository) GetTagRepositoryToDomainModelTx added in v0.6.0

func (repo *Sqlite3TagRepository) GetTagRepositoryToDomainModelTx(ctx context.Context, tx *sql.Tx) func(repositoryModel any) (domainModel *domain.Tag, err error)

func (*Sqlite3TagRepository) GetWhere

func (repo *Sqlite3TagRepository) GetWhere(ctx context.Context, domainColumnFilter *domain.TagFilter) (records []*domain.Tag, err error)

func (*Sqlite3TagRepository) LoadEntityRelations added in v0.6.0

func (repo *Sqlite3TagRepository) LoadEntityRelations(ctx context.Context, tx *sql.Tx, repoModel *Tag) (err error)

PERF: This can probably be sped up by not using singular mode

func (*Sqlite3TagRepository) New

func (repo *Sqlite3TagRepository) New(args any) (newRepo repoCommon.TagRepository, err error)

func (*Sqlite3TagRepository) Replace

func (repo *Sqlite3TagRepository) Replace(ctx context.Context, domainModels []*domain.Tag) (err error)

func (*Sqlite3TagRepository) ReplaceTx added in v0.6.0

func (repo *Sqlite3TagRepository) ReplaceTx(ctx context.Context, domainModels []*domain.Tag, tx *sql.Tx) (err error)

func (*Sqlite3TagRepository) TagDomainToRepositoryFilter added in v0.6.0

func (repo *Sqlite3TagRepository) TagDomainToRepositoryFilter(ctx context.Context, domainFilter *domain.TagFilter) (repositoryFilter any, err error)

func (*Sqlite3TagRepository) TagDomainToRepositoryModel added in v0.6.0

func (repo *Sqlite3TagRepository) TagDomainToRepositoryModel(ctx context.Context, domainModel *domain.Tag) (repositoryModel any, err error)

func (*Sqlite3TagRepository) TagDomainToRepositoryModelMinimal added in v0.6.0

func (repo *Sqlite3TagRepository) TagDomainToRepositoryModelMinimal(ctx context.Context, domainModel *domain.Tag) (repositoryModel any, err error)

func (*Sqlite3TagRepository) TagDomainToRepositoryModelMinimalTx added in v0.6.0

func (repo *Sqlite3TagRepository) TagDomainToRepositoryModelMinimalTx(ctx context.Context, tx *sql.Tx, domainModel *domain.Tag) (repositoryModel any, err error)

func (*Sqlite3TagRepository) TagDomainToRepositoryModelTx added in v0.6.0

func (repo *Sqlite3TagRepository) TagDomainToRepositoryModelTx(ctx context.Context, tx *sql.Tx, domainModel *domain.Tag) (repositoryModel any, err error)

func (*Sqlite3TagRepository) TagDomainToRepositoryUpdater added in v0.6.0

func (repo *Sqlite3TagRepository) TagDomainToRepositoryUpdater(ctx context.Context, domainUpdater *domain.TagUpdater) (repositoryUpdater any, err error)

func (*Sqlite3TagRepository) TagRepositoryToDomainModel added in v0.6.0

func (repo *Sqlite3TagRepository) TagRepositoryToDomainModel(ctx context.Context, repositoryModel any) (domainModel *domain.Tag, err error)

TODO: These functions should be context aware

func (*Sqlite3TagRepository) TagRepositoryToDomainModelTx added in v0.6.0

func (repo *Sqlite3TagRepository) TagRepositoryToDomainModelTx(ctx context.Context, tx *sql.Tx, repositoryModel any) (domainModel *domain.Tag, err error)

TODO: These functions should be context aware

func (*Sqlite3TagRepository) Update

func (repo *Sqlite3TagRepository) Update(ctx context.Context, domainModels []*domain.Tag, domainColumnUpdater *domain.TagUpdater) (err error)

func (*Sqlite3TagRepository) UpdateRelatedEntities added in v0.6.0

func (repo *Sqlite3TagRepository) UpdateRelatedEntities(ctx context.Context, tx *sql.Tx, repositoryModel *Tag) error

func (*Sqlite3TagRepository) UpdateWhere

func (repo *Sqlite3TagRepository) UpdateWhere(ctx context.Context, domainColumnFilter *domain.TagFilter, domainColumnUpdater *domain.TagUpdater) (numAffectedRecords int64, err error)

func (*Sqlite3TagRepository) Upsert

func (repo *Sqlite3TagRepository) Upsert(ctx context.Context, domainModels []*domain.Tag) (err error)

type Sqlite3TagRepositoryConstructorArgs

type Sqlite3TagRepositoryConstructorArgs struct {
	DB     *sql.DB
	Logger *log.Logger
}

type Tag

type Tag struct {
	L         tagL       `boil:"-" json:"-" toml:"-" yaml:"-"`
	R         *tagR      `boil:"-" json:"-" toml:"-" yaml:"-"`
	Tag       string     `boil:"tag" json:"tag" toml:"tag" yaml:"tag"`
	Path      string     `boil:"path" json:"path" toml:"path" yaml:"path"`
	Children  string     `boil:"children" json:"children" toml:"children" yaml:"children"`
	ParentTag null.Int64 `boil:"parent_tag" json:"parent_tag,omitempty" toml:"parent_tag" yaml:"parent_tag,omitempty"`
	ID        int64      `boil:"id" json:"id" toml:"id" yaml:"id"`
}

Tag is an object representing the database table.

func FindTag

func FindTag(ctx context.Context, exec boil.ContextExecutor, iD int64, selectCols ...string) (*Tag, error)

FindTag retrieves a single record by ID with an executor. If selectCols is empty Find will return all columns.

func (*Tag) AddBookmarks

func (o *Tag) AddBookmarks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Bookmark) error

AddBookmarks adds the given related objects to the existing relationships of the tag, optionally inserting them as new records. Appends related to o.R.Bookmarks. Sets related.R.Tags appropriately.

func (*Tag) AddDocuments

func (o *Tag) AddDocuments(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Document) error

AddDocuments adds the given related objects to the existing relationships of the tag, optionally inserting them as new records. Appends related to o.R.Documents. Sets related.R.Tags appropriately.

func (*Tag) AddParentTagTags

func (o *Tag) AddParentTagTags(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Tag) error

AddParentTagTags adds the given related objects to the existing relationships of the tag, optionally inserting them as new records. Appends related to o.R.ParentTagTags. Sets related.R.ParentTagTag appropriately.

func (*Tag) Bookmarks

func (o *Tag) Bookmarks(mods ...qm.QueryMod) bookmarkQuery

Bookmarks retrieves all the bookmark's Bookmarks with an executor.

func (*Tag) Delete

func (o *Tag) Delete(ctx context.Context, exec boil.ContextExecutor) (int64, error)

Delete deletes a single Tag record with an executor. Delete will match against the primary key column to find the record to delete.

func (*Tag) Documents

func (o *Tag) Documents(mods ...qm.QueryMod) documentQuery

Documents retrieves all the document's Documents with an executor.

func (*Tag) Insert

func (o *Tag) Insert(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) error

Insert a single record using an executor. See boil.Columns.InsertColumnSet documentation to understand column list inference for inserts.

func (*Tag) ParentTagTag

func (o *Tag) ParentTagTag(mods ...qm.QueryMod) tagQuery

ParentTagTag pointed to by the foreign key.

func (*Tag) ParentTagTags

func (o *Tag) ParentTagTags(mods ...qm.QueryMod) tagQuery

ParentTagTags retrieves all the tag's Tags with an executor via parent_tag column.

func (*Tag) Reload

func (o *Tag) Reload(ctx context.Context, exec boil.ContextExecutor) error

Reload refetches the object from the database using the primary keys with an executor.

func (*Tag) RemoveBookmarks

func (o *Tag) RemoveBookmarks(ctx context.Context, exec boil.ContextExecutor, related ...*Bookmark) error

RemoveBookmarks relationships from objects passed in. Removes related items from R.Bookmarks (uses pointer comparison, removal does not keep order) Sets related.R.Tags.

func (*Tag) RemoveDocuments

func (o *Tag) RemoveDocuments(ctx context.Context, exec boil.ContextExecutor, related ...*Document) error

RemoveDocuments relationships from objects passed in. Removes related items from R.Documents (uses pointer comparison, removal does not keep order) Sets related.R.Tags.

func (*Tag) RemoveParentTagTag

func (o *Tag) RemoveParentTagTag(ctx context.Context, exec boil.ContextExecutor, related *Tag) error

RemoveParentTagTag relationship. Sets o.R.ParentTagTag to nil. Removes o from all passed in related items' relationships struct.

func (*Tag) RemoveParentTagTags

func (o *Tag) RemoveParentTagTags(ctx context.Context, exec boil.ContextExecutor, related ...*Tag) error

RemoveParentTagTags relationships from objects passed in. Removes related items from R.ParentTagTags (uses pointer comparison, removal does not keep order) Sets related.R.ParentTagTag.

func (*Tag) SetBookmarks

func (o *Tag) SetBookmarks(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Bookmark) error

SetBookmarks removes all previously related items of the tag replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Tags's Bookmarks accordingly. Replaces o.R.Bookmarks with related. Sets related.R.Tags's Bookmarks accordingly.

func (*Tag) SetDocuments

func (o *Tag) SetDocuments(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Document) error

SetDocuments removes all previously related items of the tag replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.Tags's Documents accordingly. Replaces o.R.Documents with related. Sets related.R.Tags's Documents accordingly.

func (*Tag) SetParentTagTag

func (o *Tag) SetParentTagTag(ctx context.Context, exec boil.ContextExecutor, insert bool, related *Tag) error

SetParentTagTag of the tag to the related item. Sets o.R.ParentTagTag to related. Adds o to related.R.ParentTagTags.

func (*Tag) SetParentTagTags

func (o *Tag) SetParentTagTags(ctx context.Context, exec boil.ContextExecutor, insert bool, related ...*Tag) error

SetParentTagTags removes all previously related items of the tag replacing them completely with the passed in related items, optionally inserting them as new records. Sets o.R.ParentTagTag's ParentTagTags accordingly. Replaces o.R.ParentTagTags with related. Sets related.R.ParentTagTag's ParentTagTags accordingly.

func (*Tag) Update

func (o *Tag) Update(ctx context.Context, exec boil.ContextExecutor, columns boil.Columns) (int64, error)

Update uses an executor to update the Tag. See boil.Columns.UpdateColumnSet documentation to understand column list inference for updates. Update does not automatically update the record in case of default values. Use .Reload() to refresh the records.

func (*Tag) Upsert

func (o *Tag) Upsert(ctx context.Context, exec boil.ContextExecutor, updateOnConflict bool, conflictColumns []string, updateColumns, insertColumns boil.Columns) error

Upsert attempts an insert using an executor, and does an update or ignore on conflict. See boil.Columns documentation for how to properly use updateColumns and insertColumns.

type TagField

type TagField string

type TagFilter

type TagFilter struct {
	Tag       optional.Optional[model.FilterOperation[string]]
	Path      optional.Optional[model.FilterOperation[string]]
	Children  optional.Optional[model.FilterOperation[string]]
	ParentTag optional.Optional[model.FilterOperation[null.Int64]]
	ID        optional.Optional[model.FilterOperation[int64]]
}

type TagHook

type TagHook func(context.Context, boil.ContextExecutor, *Tag) error

TagHook is the signature for custom Tag hook methods

type TagSlice

type TagSlice []*Tag

TagSlice is an alias for a slice of pointers to Tag. This should almost always be used instead of []Tag.

func (TagSlice) DeleteAll

func (o TagSlice) DeleteAll(ctx context.Context, exec boil.ContextExecutor) (int64, error)

DeleteAll deletes all rows in the slice, using an executor.

func (*TagSlice) ReloadAll

func (o *TagSlice) ReloadAll(ctx context.Context, exec boil.ContextExecutor) error

ReloadAll refetches every row with matching primary key column values and overwrites the original object slice with the newly updated slice.

func (TagSlice) UpdateAll

func (o TagSlice) UpdateAll(ctx context.Context, exec boil.ContextExecutor, cols M) (int64, error)

UpdateAll updates all rows with the specified column values, using an executor.

type TagUpdater

type TagUpdater struct {
	Tag       optional.Optional[model.UpdateOperation[string]]
	Path      optional.Optional[model.UpdateOperation[string]]
	Children  optional.Optional[model.UpdateOperation[string]]
	ParentTag optional.Optional[model.UpdateOperation[null.Int64]]
	ID        optional.Optional[model.UpdateOperation[int64]]
}

func (*TagUpdater) ApplyToModel

func (updater *TagUpdater) ApplyToModel(tagModel *Tag)

func (*TagUpdater) GetSetUpdaters

func (updater *TagUpdater) GetSetUpdaters() *list.List

type TagUpdaterMapping

type TagUpdaterMapping[T any] struct {
	Field   TagField
	Updater model.UpdateOperation[T]
}

Jump to

Keyboard shortcuts

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