@defun sqlite-execute-batch db statements
Execute the @acronym{SQL} @var{statements}. @var{statements} is a
string containing 0 or more @acronym{SQL} statements. This command
-might be useful when we want to execute multiple @acronym{DDL}
-statements.
+might be useful when a Lisp program needs to execute multiple Data
+Definition Language (@acronym{DDL}) statements in one go.
@end defun
major mode based on the interpreter after 'env -S'.
+++
-** New command 'sqlite-execute-batch'.
-This command lets the user execute multiple SQL commands in one
-command. It is useful when the user wants to evaluate an entire SQL
-file.
+** New function 'sqlite-execute-batch'.
+This function lets the user execute multiple SQL statements in one go.
+It is useful, for example, when a Lisp program needs to evaluate an
+entire SQL file.
+++
\f
}
DEFUN ("sqlite-execute-batch", Fsqlite_execute_batch, Ssqlite_execute_batch, 2, 2, 0,
- doc: /* Execute multiple SQL statements in DB.
-Query is a string containing 0 or more SQL statements. */)
- (Lisp_Object db, Lisp_Object query)
+ doc: /* Execute multiple SQL STATEMENTS in DB.
+STATEMENTS is a string containing 0 or more SQL statements. */)
+ (Lisp_Object db, Lisp_Object statements)
{
check_sqlite (db, false);
- CHECK_STRING (query);
- Lisp_Object encoded = encode_string(query);
+ CHECK_STRING (statements);
+ Lisp_Object encoded = encode_string (statements);
return sqlite_exec (XSQLITE (db)->db, SSDATA (encoded));
}