murmuration-mariadb 1.0.31 → 1.0.37

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -35,6 +35,8 @@ const { database, migrate, transaction, Connection } = murmuration,
35
35
  ...
36
36
  ```
37
37
 
38
+ This package leverages the [`mysql`](https://github.com/mysqljs/mysql) package and used its parameterised queries. This guard against SQL injection without further ado.
39
+
38
40
  ### Configuration
39
41
 
40
42
  The `configuration` argument should be a plain old JavaScript object with at least the following properties:
@@ -85,7 +87,7 @@ query(connection, sql, username, password, (error, rows) => {
85
87
  ```
86
88
  The `execute()` function is treated entirely similarly.
87
89
 
88
- For more information on placeholders and performing queries in general, see the `pg` package documentation [here](https://node-postgres.com/features/queries).
90
+ For more information on placeholders and performing queries in general, see the `mysql` package documentation [here](https://github.com/mysqljs/mysql#performing-queries).
89
91
 
90
92
  ## Contact
91
93
 
package/bin/migrate.js CHANGED
@@ -5,13 +5,13 @@ const murmuration = require("murmuration");
5
5
  const Connection = require("./connection"),
6
6
  migrationSQLMap = require("./migrationSQLMap");
7
7
 
8
- function migrate(configuration, migrationsDirectoryPath, callback) {
8
+ function migrate(configuration, migrationsDirectoryPath, CustomMigrationMap, callback) {
9
9
  Object.assign(configuration, {
10
10
  Connection,
11
11
  migrationSQLMap
12
12
  });
13
13
 
14
- murmuration.migrate(configuration, migrationsDirectoryPath, callback);
14
+ murmuration.migrate(configuration, migrationsDirectoryPath, CustomMigrationMap, callback);
15
15
  }
16
16
 
17
17
  module.exports = migrate;
package/index.js CHANGED
@@ -6,11 +6,12 @@ const migrate = require("./bin/migrate"),
6
6
  Connection = require("./bin/connection"),
7
7
  transaction = require("./bin/transaction");
8
8
 
9
- const { database } = murmuration;
9
+ const { database, CustomMigration } = murmuration;
10
10
 
11
11
  module.exports = {
12
12
  database,
13
13
  migrate,
14
14
  Connection,
15
- transaction
15
+ transaction,
16
+ CustomMigration
16
17
  };
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "murmuration-mariadb",
3
3
  "author": "James Smith",
4
- "version": "1.0.31",
4
+ "version": "1.0.37",
5
5
  "license": "MIT, Anti-996",
6
6
  "homepage": "https://github.com/djalbat/murmuration-mariadb",
7
7
  "description": "Connections, transactions and migrations for MariaDB.",
@@ -10,7 +10,7 @@
10
10
  "url": "https://github.com/djalbat/murmuration-mariadb"
11
11
  },
12
12
  "dependencies": {
13
- "murmuration": "^1.0.22",
13
+ "murmuration": "^1.0.25",
14
14
  "mysql": "^2.18.1"
15
15
  },
16
16
  "devDependencies": {},