There is sql file. It has to be used for test cases. I need to restore it. I would like to restore it without third party utils. I've made few attempts. I receive new limitations these I can not resolve easy. An easier solution has to exist. Another solutions I have seen from networks do not satisfy requirements. I can not restore functions because of semicolons in sql text.
async function rawSQLFromFile(connection, path) {
const text = fs.readFileSync(path).toString()
const queries = text.split(';')
for(const query of queries) {
await runQuery(connection, query)
}
}
I use mysql library But it does not have the functionality.
I can not restore functions because of bracketsandit does not have the functionality? It is a bit unclear what you mean by that...