Skip to content

Commit de1e8b4

Browse files
committed
Remove unsupported section
1 parent 3bc0f2e commit de1e8b4

1 file changed

Lines changed: 0 additions & 31 deletions

File tree

website/docs/reference/sql/prepared_statements.md

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -6,37 +6,6 @@ pagination_next: 'reference/sql/explain'
66
sidebar_position: 4
77
---
88

9-
## Inferred Types
10-
11-
When a parameter type is not explicitly specified in a prepared statement, the type is inferred at execution time based on the provided argument. This approach helps simplify statement definitions and supports flexible query execution.
12-
13-
**SQL Example**
14-
15-
To create a prepared statement named `greater_than` that infers the type of its parameter:
16-
17-
```sql
18-
PREPARE greater_than AS SELECT * FROM example WHERE a > $1;
19-
```
20-
21-
To execute the prepared statement with an integer argument:
22-
23-
```sql
24-
EXECUTE greater_than(20);
25-
```
26-
27-
**Python Example**
28-
29-
```python
30-
import adbc_driver_flightsql.dbapi
31-
32-
with adbc_driver_flightsql.dbapi.connect("grpc://localhost:50051") as conn:
33-
with conn.cursor() as cur:
34-
cur.execute("PREPARE greater_than AS SELECT * FROM example WHERE a > $1;")
35-
cur.execute("EXECUTE greater_than(?)", (20,))
36-
result = cur.fetchall()
37-
print(result)
38-
```
39-
409
## Positional Arguments
4110

4211
Prepared statements can use positional arguments to support multiple parameters. Each parameter is referenced by its position in the statement.

0 commit comments

Comments
 (0)