MCPcopy Create free account
hub / github.com/FirebirdSQL/firebird / API_ROUTINE isc_embed_dsql_declare

Function API_ROUTINE isc_embed_dsql_declare

src/yvalve/user_dsql.cpp:170–197  ·  view source on GitHub ↗

____________________________________________________________ Declare a cursor for a dynamic request.

Source from the content-addressed store, hash-verified

168// Declare a cursor for a dynamic request.
169//
170ISC_STATUS API_ROUTINE isc_embed_dsql_declare(ISC_STATUS* user_status,
171 const SCHAR* stmt_name,
172 const SCHAR* cursor)
173{
174 ISC_STATUS_ARRAY local_status;
175
176 INIT_DSQL(user_status, local_status);
177 try
178 {
179 // get the symbol table entry
180
181 dsql_stmt* statement = lookup_stmt(stmt_name, statement_names, NAME_statement);
182
183 const ISC_STATUS s = isc_dsql_set_cursor_name(user_status, &statement->stmt_handle, cursor, 0);
184 if (s) {
185 return s;
186 }
187
188 Firebird::WriteLockGuard guard(global_sync, FB_FUNCTION);
189 statement->stmt_cursor = insert_name(cursor, &cursor_names, statement);
190
191 return s;
192 }
193 catch (const Firebird::Exception& ex)
194 {
195 return error(ex);
196 }
197}
198
199
200//____________________________________________________________

Callers

nothing calls this directly

Calls 4

INIT_DSQLFunction · 0.85
lookup_stmtFunction · 0.85
insert_nameFunction · 0.85
errorFunction · 0.70

Tested by

no test coverage detected