-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplwasm_spi.h
117 lines (97 loc) · 1.94 KB
/
plwasm_spi.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
#ifndef H_PLWASM_UTILS_PG_SPI
#define H_PLWASM_UTILS_PG_SPI
#include "plwasm_types.h"
void
plwasm_spi_ready(
plwasm_call_context_t *cctx
);
void
plwasm_spi_finish(
plwasm_call_context_t *cctx
);
void
plwasm_spi_internal_transaction_begin(
plwasm_call_context_t *cctx
);
void
plwasm_spi_internal_transaction_commit(
plwasm_call_context_t *cctx,
ResourceOwner oldowner
);
void
plwasm_spi_internal_transaction_abort(
plwasm_call_context_t *cctx,
ResourceOwner oldowner
);
ErrorData*
plwasm_spi_err_capture(
plwasm_call_context_t *cctx
);
plwasm_pg_statement_context_t*
plwasm_spi_statement_new(
plwasm_call_context_t *cctx,
char *statement
);
plwasm_pg_statement_context_t*
plwasm_spi_statement_get_context(
plwasm_call_context_t *cctx,
int stmt_id
);
void
plwasm_spi_statement_prepare(
plwasm_call_context_t *cctx,
plwasm_pg_statement_context_t* stmctx
);
uint64_t
plwasm_spi_statement_execute(
plwasm_call_context_t *cctx,
plwasm_pg_statement_context_t* stmctx,
int limit
);
bool
plwasm_spi_statement_close(
plwasm_call_context_t *cctx,
plwasm_pg_statement_context_t* stmctx
);
bool
plwasm_spi_resultset_is_opened(
plwasm_call_context_t *cctx,
plwasm_pg_statement_context_t* stmctx
);
bool
plwasm_spi_resultset_fetch(
plwasm_call_context_t *cctx,
plwasm_pg_statement_context_t* stmctx
);
bool
plwasm_spi_resultset_close(
plwasm_call_context_t *cctx,
plwasm_pg_statement_context_t* stmctx
);
int
plwasm_spi_resultset_meta_get_att_count(
plwasm_call_context_t *cctx,
plwasm_pg_statement_context_t* stmctx
);
Form_pg_attribute
plwasm_spi_resultset_meta_get_att_desc(
plwasm_call_context_t *cctx,
plwasm_pg_statement_context_t* stmctx,
int att_idx
);
Datum
plwasm_spi_resultset_get_val_as(
plwasm_call_context_t *cctx,
plwasm_pg_statement_context_t* stmctx,
int att_index,
Oid desired_type,
bool *is_null
);
Datum
plwasm_spi_query_scalar_as(
plwasm_call_context_t *cctx,
char *statement,
Oid desired_type,
bool *is_null
);
#endif