Fun 0.41.5
The programming language that makes you have fun!
Loading...
Searching...
No Matches
exec.c File Reference

Implements the OP_SQLITE_EXEC opcode (conditional build). More...

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

 free_value (vh)
 free_value (vsql)
 if (!h||!h->db||!sql)

Variables

case OP_SQLITE_EXEC
Value vh = pop_value(vm)
int hid = (int)vh.i
char * sql = value_to_string_alloc(&vsql)
SqlHandleh = sql_reg_get(hid)
char * errmsg = NULL
int rc = sqlite3_exec(h->db, sql, NULL, NULL, &errmsg)

Detailed Description

Implements the OP_SQLITE_EXEC opcode (conditional build).

Executes a SQL statement against an open SQLite handle when FUN_WITH_SQLITE is enabled. Returns the SQLite result code.

OP_SQLITE_EXEC: (handle:int, sql:string) -> int rc (0=OK)

Definition in file exec.c.

Function Documentation

◆ free_value() [1/2]

free_value ( vh )

◆ free_value() [2/2]

free_value ( vsql )

◆ if()

if ( !h||!h->db||! sql)

Definition at line 29 of file exec.c.

Variable Documentation

◆ errmsg

char* errmsg = NULL

Definition at line 34 of file exec.c.

◆ h

Definition at line 28 of file exec.c.

◆ hid

int hid = (int)vh.i

Definition at line 24 of file exec.c.

◆ OP_SQLITE_EXEC

case OP_SQLITE_EXEC

Definition at line 20 of file exec.c.

◆ rc

int rc = sqlite3_exec(h->db, sql, NULL, NULL, &errmsg)

Definition at line 35 of file exec.c.

◆ sql

char* sql = value_to_string_alloc(&vsql)

Definition at line 25 of file exec.c.

◆ vh

Value vh = pop_value(vm)

Definition at line 23 of file exec.c.