Skip to content

Commit

Permalink
updated context functions
Browse files Browse the repository at this point in the history
  • Loading branch information
inviscid committed Apr 23, 2024
1 parent 2736294 commit 14d970e
Show file tree
Hide file tree
Showing 5 changed files with 95 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ title: CONNECTION_ID

Returns the connection ID for the current connection.

## Analyze Syntax

```python
func.connection_id()
```

## Analyze Examples

```python
func.connection_id()

┌──────────────────────────────────────┐
│ func.connection_id() │
├──────────────────────────────────────┤
23cb06ec-583e-4eba-b790-7c8cf72a53f8
└──────────────────────────────────────┘
```

## SQL Syntax

```sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ title: CURRENT_USER

Returns the user name and host name combination for the account that the server used to authenticate the current client. This account determines your access privileges. The return value is a string in the utf8 character set.

## Analyze Syntax

```python
func.current_user()
```

## Analyze Examples

```python
func.current_user()

┌─────────────────────┐
│ func.current_user() │
├─────────────────────┤
'root'@'%'
└─────────────────────┘
```

## SQL Syntax

```sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ title: DATABASE

Returns the name of the currently selected database. If no database is selected, then this function returns `default`.

## Analyze Syntax

```python
func.database()
```

## Analyze Examples

```python
func.database()

┌─────────────────┐
│ func.database() │
├─────────────────┤
│ default │
└─────────────────┘
```

## SQL Syntax

```sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,25 @@ title: LAST_QUERY_ID

Returns the last query ID of query in current session, index can be (-1, 1, 1+2)..., out of range index will return empty string.

## Analyze Syntax

```python
func.last_query_id(<index>)
```

## Analyze Examples

```python
func.last_query_id(-1)

┌──────────────────────────────────────┐
│ func.last_query_id((- 1)) │
├──────────────────────────────────────┤
│ a6f615c6-5bad-4863-8558-afd01889448c │
└──────────────────────────────────────┘
```


## SQL Syntax

```sql
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,24 @@ title: VERSION

Returns the current version of PlaidCloud LakehouseQuery.

## Analyze Syntax

```sql
func.version()
```

## Analyze Examples

```sql
func.version()

┌───────────────────────────────────────────────────────────────────────────────────────────────────────────┐
func.version() │
├───────────────────────────────────────────────────────────────────────────────────────────────────────────┤
│ PlaidCloud LakehouseQuery v1.2.252-nightly-193ed56304(rust-1.75.0-nightly-2023-12-12T22:07:25.371440000Z) │
└───────────────────────────────────────────────────────────────────────────────────────────────────────────┘
```

## SQL Syntax

```sql
Expand All @@ -15,9 +33,9 @@ VERSION()
```sql
SELECT VERSION();

┌───────────────────────────────────────────────────────────────────────────────────────────────┐
│ version() │
├───────────────────────────────────────────────────────────────────────────────────────────────┤
┌───────────────────────────────────────────────────────────────────────────────────────────────────────────
version()
├───────────────────────────────────────────────────────────────────────────────────────────────────────────
│ PlaidCloud LakehouseQuery v1.2.252-nightly-193ed56304(rust-1.75.0-nightly-2023-12-12T22:07:25.371440000Z) │
└───────────────────────────────────────────────────────────────────────────────────────────────┘
└───────────────────────────────────────────────────────────────────────────────────────────────────────────
```

0 comments on commit 14d970e

Please sign in to comment.