Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Two methods:

  1. conn:execute

To write to a database you can use conn:execute{}. This allows you to execute any ad hoc SQL statement on a database, including UPDATE and INSERT statements. Can also call stored procedures.

By default, SQL statements specified in calls to conn:execute{} are not executed while you are editing the script. They are only executed when the channel is being run. This behavior can be overridden by setting the live parameter to true, in which case the statements are executed every time the script is executed in the editor. Be cautious about using live=true since the script is executed many times to get the annotation and auto-completion data (which can cause many INSERTs and UPDATEs) .

  1. db.tables and conn:merge

  • how to choose method to use

  • show examples of both

  • may need to be split into multiple pages

  • No labels