Difference between revisions of "Executing Commands on the Database Using Scripts"
From Observer GigaFlow Support | VIAVI Solutions Inc.
m (Niall moved page Flow/Scripting/DatabaseAccess/ExecutingCommand to Executing Commands on the Database Using Scripts) |
Revision as of 09:49, 15 October 2018
Executing Commands
//Create a table actions.getDatabaseManager().executePrepared("create table test1(id integer,name text) ",[]) //Populate table with data for (var i=0;i<10;i++){ /Create the addary with the data to pusg into the databse var datatogo = [i,i+"text"]; //Create and execute the prepared statement actions.getDatabaseManager().executePrepared("insert into test1 (id,name) values (?,?)",[datatogo]) } //Count the number of entries in the table log.warn(actions.getDatabaseManager().getLongFromDB("select count(*) from test1",0))
//log.warn(actionsgetDeviceManager())
//log.warn(actions.ros.subscriptedBlacklists)
//log.warn(actions.ros.subscriptedBlacklists.get("https://lists.blocklist.de/lists/strongips.txt"))