Advertisement
Guest User

Untitled

a guest
Feb 17th, 2020
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. // Aktualis kod
  2.  
  3.   function importTranslations() {
  4.     return createTempTable()
  5.       .then(importToTemp)
  6.       .then(copyFromTempWithTransformations)
  7.       .then(dropTempTable);
  8.  
  9.     function createTempTable() {
  10.       return database.query(
  11.         `CREATE TEMPORARY TABLE
  12.          tmp_table
  13.          (
  14.              translation TINYTEXT,
  15.              category_as_string VARCHAR(32),
  16.              id_query INT
  17.          )`
  18.       );
  19.     }
  20.  
  21. // Nem valodi megoldas
  22.  
  23.   importFromExcel({
  24.     tempTableDefinition: `SQL utasitasok...`,
  25.     importToTemp: `SQL utasitasok...`,
  26.     copyFromTempWithTransformations: `SQL utasitasok...`
  27.   });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement