1.0.8 • Published 6 years ago

@dvo/batch-query v1.0.8

Weekly downloads
1
License
ISC
Repository
-
Last release
6 years ago

@dvo/batch-query

This tool is meant to merge a mySQL query and a data array into a formatted query that does what it needs in batch. For example, the query

let query =
'REPLACE INTO common_surnames
  (america, spain, korea)
VALUES
  (?,?,Kim)'

could be combined with data like

let data = [
  ['Johnson', 'Gutierrez'],
  ['Lee', 'Pança'],  
  ['McDonald', 'Plata']
]

when called with batchQuery( query, data ) to produce the results

let formattedQuery =
'REPLACE INTO common_surnames
  (america, spain, korea)
VALUES
  (Johnson,Gutierrez,Kim),
  (Lee,Pança,Kim),
  (McDonald,Plata,Kim)'
1.0.8

6 years ago

1.0.7

6 years ago

1.0.6

6 years ago

1.0.5

6 years ago

1.0.4

6 years ago

1.0.3

6 years ago

1.0.2

6 years ago

1.0.1

6 years ago

1.0.0

6 years ago