v0.1.3 — A lightweight SQL file reader that parses SQL files or strings into an array of individual queries. Created to address TypeORM's lack of direct SQL file execution for seed/test data. Supports synchronous and asynchronous execution of queries via a runner function. Ships TypeScript types, no dependencies. Simple API, suitable for database seeding scripts and test initializers. Release cadence: infrequent, as it's a small utility.
npm install node-sql-readerNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Reads a SQL file into an array and runs queries asynchronously using a custom runner function.
Ensure SQL statements do not contain semicolons within strings or use single statements per file if possible.
For multi-statement procedures, break them into separate files or use a more advanced parser.
Use with trusted SQL or validate separately before execution.
Use runSqlFileAsync for non-blocking behavior.
Replace 'import SqlReader from ...' with 'import { SqlReader } from ...'Run 'npm install node-sql-reader' in your project root.
Encode semicolons inside strings as literal characters or avoid them.
No dependency data recorded yet.