# Class Tag

#### Implements

- AbstractTag

- Defined in packages/saltcorn-data/models/tag.ts:18

##### Index

### Constructors

constructor

### Properties

entries?
id?
name

### Methods

addEntry
delete
getEntries
getPageIds
getPages
getTableIds
getTables
getTriggerIds
getTriggers
getViewIds
getViews
update
create
delete
find
findOne
findWithEntries
update

## Constructors

### constructor

- new Tag(o: Tag | TagCfg): Tag

  #### Parameters

  - o: Tag | TagCfg

  #### Returns Tag

  - Defined in packages/saltcorn-data/models/tag.ts:23

## Properties

### `Optional` entries

entries?: TagEntry[]

Implementation of AbstractTag.entries

- Defined in packages/saltcorn-data/models/tag.ts:21

### `Optional` id

id?: number

Implementation of AbstractTag.id

- Defined in packages/saltcorn-data/models/tag.ts:20

### name

name: string

Implementation of AbstractTag.name

- Defined in packages/saltcorn-data/models/tag.ts:19

## Methods

### addEntry

- addEntry(
  __namedParameters: {
  page_id?: number;
  table_id?: number;
  trigger_id?: number;
  view_id?: number;
  },
  ): Promise<void>

  #### Parameters

  - __namedParameters: { page_id?: number; table_id?: number; trigger_id?: number; view_id?: number }

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/tag.ts:166

### delete

- delete(): Promise<void>

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/tag.ts:160

### getEntries

- getEntries(): Promise<TagEntry[]>

  #### Returns Promise<TagEntry[]>

  - Defined in packages/saltcorn-data/models/tag.ts:56

### getPageIds

- getPageIds(): Promise<number[]>

  #### Returns Promise<number[]>

  - Defined in packages/saltcorn-data/models/tag.ts:77

### getPages

- getPages(): Promise<Page[]>

  #### Returns Promise<Page[]>

  - Defined in packages/saltcorn-data/models/tag.ts:108

### getTableIds

- getTableIds(): Promise<number[]>

  #### Returns Promise<number[]>

  - Defined in packages/saltcorn-data/models/tag.ts:69

### getTables

- getTables(): Promise<Table[]>

  #### Returns Promise<Table[]>

  - Defined in packages/saltcorn-data/models/tag.ts:100

### getTriggerIds

- getTriggerIds(): Promise<number[]>

  #### Returns Promise<number[]>

  - Defined in packages/saltcorn-data/models/tag.ts:81

### getTriggers

- getTriggers(): Promise<Trigger[]>

  #### Returns Promise<Trigger[]>

  - Defined in packages/saltcorn-data/models/tag.ts:112

### getViewIds

- getViewIds(): Promise<number[]>

  #### Returns Promise<number[]>

  - Defined in packages/saltcorn-data/models/tag.ts:73

### getViews

- getViews(): Promise<View[]>

  #### Returns Promise<View[]>

  - Defined in packages/saltcorn-data/models/tag.ts:104

### update

- update(row: Row): Promise<void>

  #### Parameters

  - row: Row

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/tag.ts:144

### `Static` create

- create(cfg: TagCfg): Promise<Tag>

  #### Parameters

  - cfg: TagCfg

  #### Returns Promise<Tag>

  - Defined in packages/saltcorn-data/models/tag.ts:119

### `Static` delete

- delete(id: number): Promise<void>

  #### Parameters

  - id: number

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/tag.ts:150

### `Static` find

- find(where?: Where, selectopts?: SelectOptions): Promise<Tag[]>

  #### Parameters

  - `Optional` where: Where
  - selectopts: SelectOptions = ...

  #### Returns Promise<Tag[]>

  - Defined in packages/saltcorn-data/models/tag.ts:34

### `Static` findOne

- findOne(where: Where): Promise<Tag>

  #### Parameters

  - where: Where

  #### Returns Promise<Tag>

  - Defined in packages/saltcorn-data/models/tag.ts:42

### `Static` findWithEntries

- findWithEntries(entriesWhere: any): Promise<Tag[]>

  #### Parameters

  - entriesWhere: any

  #### Returns Promise<Tag[]>

  - Defined in packages/saltcorn-data/models/tag.ts:47

### `Static` update

- update(id: number, row: Row): Promise<void>

  #### Parameters

  - id: number
  - row: Row

  #### Returns Promise<void>

  - Defined in packages/saltcorn-data/models/tag.ts:140