nl_tokens: Inserts multiple rows in a table from an Array using the built in method <code > executeConcurrent () < / code > limiting the amount of parallel requests .
pl_tokens: async function example ( ) { await client . connect ( ) ; await client . execute ( ` ` ) ; await client . execute ( ` ` ) ; await client . execute ( ` ` ) ; // The maximum amount of async executions that are going to be launched in parallel // at any given time const concurrencyLevel = 32 ; // Use an Array with 10000 different values const values = Array . from ( new Array ( 10000 ) . keys ( ) ) . map ( x => [ Uuid . random ( ) , x . toString ( ) ] ) ; try { const query = 'INSERT INTO tbl_sample_kv (id, value) VALUES (?, ?)' ; await executeConcurrent ( client , query , <mask> ) ; console . log ( ` ${ values . length } ${ concurrencyLevel } ` ) ; } finally { client . shutdown ( ) ; } }