Skip to content

Commit

Permalink
Clarify update statement support for JDBC connectors
Browse files Browse the repository at this point in the history
  • Loading branch information
blvckcoffee committed Oct 12, 2023
1 parent 6858091 commit 63829b1
Show file tree
Hide file tree
Showing 9 changed files with 57 additions and 0 deletions.
3 changes: 3 additions & 0 deletions docs/src/main/sphinx/connector/ignite.md
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,9 @@ statements, the connector supports the following features:
- {doc}`/sql/drop-table`
- {doc}`/sql/alter-table`

```{include} sql-update-limitation.fragment
```

```{include} alter-table-limitation.fragment
```

Expand Down
3 changes: 3 additions & 0 deletions docs/src/main/sphinx/connector/mariadb.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,9 @@ statements, the connector supports the following features:
- {doc}`/sql/create-schema`
- {doc}`/sql/drop-schema`

```{include} sql-update-limitation.fragment
```

```{include} sql-delete-limitation.fragment
```

Expand Down
3 changes: 3 additions & 0 deletions docs/src/main/sphinx/connector/mysql.md
Original file line number Diff line number Diff line change
Expand Up @@ -336,6 +336,9 @@ the following statements:
- {doc}`/sql/create-schema`
- {doc}`/sql/drop-schema`

```{include} sql-update-limitation.fragment
```

```{include} sql-delete-limitation.fragment
```

Expand Down
3 changes: 3 additions & 0 deletions docs/src/main/sphinx/connector/oracle.md
Original file line number Diff line number Diff line change
Expand Up @@ -422,6 +422,9 @@ supports the following statements:
- {doc}`/sql/alter-table`
- {doc}`/sql/comment`

```{include} sql-update-limitation.fragment
```

```{include} sql-delete-limitation.fragment
```

Expand Down
3 changes: 3 additions & 0 deletions docs/src/main/sphinx/connector/postgresql.md
Original file line number Diff line number Diff line change
Expand Up @@ -352,6 +352,9 @@ statements, the connector supports the following features:
- {doc}`/sql/truncate`
- {ref}`sql-schema-table-management`

```{include} sql-update-limitation.fragment
```

```{include} sql-delete-limitation.fragment
```

Expand Down
3 changes: 3 additions & 0 deletions docs/src/main/sphinx/connector/redshift.md
Original file line number Diff line number Diff line change
Expand Up @@ -150,6 +150,9 @@ statements, the connector supports the following features:
- {doc}`/sql/truncate`
- {ref}`sql-schema-table-management`

```{include} sql-update-limitation.fragment
```

```{include} sql-delete-limitation.fragment
```

Expand Down
3 changes: 3 additions & 0 deletions docs/src/main/sphinx/connector/singlestore.md
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,9 @@ statements, the connector supports the following features:
- {doc}`/sql/create-schema`
- {doc}`/sql/drop-schema`

```{include} sql-update-limitation.fragment
```

```{include} sql-delete-limitation.fragment
```

Expand Down
33 changes: 33 additions & 0 deletions docs/src/main/sphinx/connector/sql-update-limitation.fragment
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
### UPDATE

Only `UPDATE` statements with constant assignments and predicates are
supported. For example, the following statement is supported because the values
assigned are constants:

```sql
UPDATE table SET col1 = 1 WHERE col3 = 1
```

Arithmetic expressions, function calls, and other non-constant `UPDATE`
statements are not supported. For example, the following statement is not
supported because arithmetic expressions cannot be used with the `SET`
command:

```sql
UPDATE table SET col1 = col2 + 2 WHERE col3 = 1
```

The `=`, `!=`, `>`, `<`, `>=`, `<=`, `IN`, `NOT IN` operators are supported in
predicates. The following statement is not supported because the `AND` operator
cannot be used in predicates:

```sql
UPDATE table SET col1 = 1 WHERE col3 = 1 AND col2 = 3
```

All column values of a table row cannot be updated simultaneously. For a three
column table, the following statement is not supported:

```sql
UPDATE table SET col1 = 1, col2 = 2, col3 = 3 WHERE col3 = 1
```
3 changes: 3 additions & 0 deletions docs/src/main/sphinx/connector/sqlserver.md
Original file line number Diff line number Diff line change
Expand Up @@ -339,6 +339,9 @@ supports the following features:
- {doc}`/sql/truncate`
- {ref}`sql-schema-table-management`

```{include} sql-update-limitation.fragment
```

```{include} sql-delete-limitation.fragment
```

Expand Down

0 comments on commit 63829b1

Please sign in to comment.