# Database `[Server]`

Streamlined utilities for managing database tables, triggers, and columns

## JO Functions

### jo.database.addColumn()

A function to create a column in a specific table if not exist <br>

#### Syntax

```lua
jo.database.addColumn(tableName, name, definition)
```

#### Parameters

`tableName` : _string_
> The name of the table
>

`name` : _string_
> The name of the column
>

`definition` : _string_
> The definition of the column
>

#### Return Value

Type : _boolean_

> Return `true` if the column is created, `false` otherwise

---

### jo.database.addTable()

A function to create a table if not exist <br>

#### Syntax

```lua
jo.database.addTable(tableName, definition)
```

#### Parameters

`tableName` : _string_
> The name of the table
>

`definition` : _string_
> The definition of the table
>

#### Return Value

Type : _boolean_

> Return `true` if the table is created, `false` otherwise

---

### jo.database.addTrigger()

A function to create a trigger if not exist <br>

#### Syntax

```lua
jo.database.addTrigger(triggerName, definition)
```

#### Parameters

`triggerName` : _string_
> The name of the trigger
>

`definition` : _string_
> The definition of the trigger
>

#### Return Value

Type : _boolean_

> Return `true` if the trigger is created, `false` otherwise

---

### jo.database.doesTableExist()

A function to check if a table exists <br>

#### Syntax

```lua
jo.database.doesTableExist(tableName)
```

#### Parameters

`tableName` : _string_
> The name of the table
>

#### Return Value

Type : _boolean_

> Return `true` if the table exists, `false` otherwise
