{"_id":"@aaqilniz/loopback-connector-mysql","_rev":"5-854bc28559d372ed5fb2ff697985f752","name":"@aaqilniz/loopback-connector-mysql","dist-tags":{"latest":"6.1.5"},"versions":{"6.1.0":{"name":"@aaqilniz/loopback-connector-mysql","version":"6.1.0","description":"MySQL connector for loopback-datasource-juggler","engines":{"node":">=10"},"main":"index.js","scripts":{"pretest":"node pretest.js","lint":"eslint .","test":"mocha test/*.test.js node_modules/juggler-v3/test.js node_modules/juggler-v4/test.js","posttest":"npm run lint"},"dependencies":{"async":"^3.2.0","debug":"^4.1.1","lodash":"^4.17.11","loopback-connector":"^5.0.0","mysql":"^2.11.1","strong-globalize":"^6.0.4"},"devDependencies":{"eslint":"^7.7.0","eslint-config-loopback":"^13.1.0","juggler-v3":"file:./deps/juggler-v3","juggler-v4":"file:./deps/juggler-v4","loopback-datasource-juggler":"^3.0.0 || ^4.0.0","mocha":"^8.1.2","rc":"^1.0.0","should":"^13.2.3","sinon":"^9.0.3","@commitlint/config-conventional":"^12.1.4"},"repository":{"type":"git","url":"git+https://github.com/loopbackio/loopback-connector-mysql.git"},"license":"MIT","author":{"name":"IBM Corp."},"gitHead":"21e3bba4c4f58435b6a15ab33c85657eec3f88b1","bugs":{"url":"https://github.com/loopbackio/loopback-connector-mysql/issues"},"homepage":"https://github.com/loopbackio/loopback-connector-mysql#readme","_id":"@aaqilniz/loopback-connector-mysql@6.1.0","_nodeVersion":"16.13.0","_npmVersion":"8.5.3","dist":{"integrity":"sha512-9oAOOCHp9DM7uU50t1coKBuPsTD2Om/I4nX8CzjgTOA4fjUDNXyHVU2f/26sVBfgvOGOSKIvMMX2pu6kRX9UZw==","shasum":"6d6c8577a3e7ccf3491ddc22701bc69cd7d06c9f","tarball":"https://registry.npmjs.org/@aaqilniz/loopback-connector-mysql/-/loopback-connector-mysql-6.1.0.tgz","fileCount":23,"unpackedSize":106690,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDOT6xZBe/U0Z6wqC+c1tuu6L432FDI/UcC1FZcdVL4egIgMQIpMFqcQ7KEFEsvMNqxaOgIfQcq0vtMm1YKfRzg50Q="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYRN9ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmoRLg//fQ0AkvHM+JwS4JfzECwdtkzUHHQ1mZhcZ2+6ygu503uuA8On\r\neP4OdJjox3iaQcuYsiBDe8IazK6NJ1AlxahoKdQYnd/27fPhn+1J3DpfaoFY\r\n6VYm7cCCAF4GOP58BNhuoftT3P+SXQKRzoCz718LasMe/Lk+GKnH62JvVmoy\r\nnw4zBC32ledI4HvIxEiPuYLkIlsFXzE795oX8t/q1JLHsABt0Qscnulzjo1T\r\n82CAqCIzPkjoZL2+UPG8LppfolunPsJnaTUD2NLn2NHxPnA8SL06s01BdKju\r\nUUEzwL1xNyN3+mnVJr41gmyQ4XX5BDWuN8JKbn8AgBBiDD/G1v6uOjEB/sOW\r\nGJ+34rfxKaUh71jaY1tOyQZAFgKZiBfBrfJdy30UVPYMjVhYYL7WxKC5kD4j\r\n80ecCInz9RspP8NjUxWStapc8OnfNtjPA3vhCYnfLZKXRhmAIoMp2voDtCgl\r\nz5IZwjWEKGDD71wg6kC+KIX3y6yTNudh9ATBjYNUYjcY+FbaTCNJCTTVRS60\r\nnta1uo2PYeDchsByB+dEDpP6MccfGid2T6/7UTnnd2ujDAbPwITPBMipKhiH\r\nm59Wwtf8c+WEDaKRK/AjZ8L1u40Pkii4gcN8mzXFExlpYGAbAPuIMrLpLsj+\r\nCsDt49frBgKQpk1vzO2Dk8sCLqKALLIH6ao=\r\n=cn8z\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aaqilniz","email":"aaqilniz@yahoo.com"},"directories":{},"maintainers":[{"name":"aaqilniz","email":"aaqilniz@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/loopback-connector-mysql_6.1.0_1667306364929_0.8875893419291405"},"_hasShrinkwrap":false},"6.1.1":{"name":"@aaqilniz/loopback-connector-mysql","version":"6.1.1","description":"MySQL connector for loopback-datasource-juggler","engines":{"node":">=10"},"main":"index.js","scripts":{"pretest":"node pretest.js","lint":"eslint .","test":"mocha test/*.test.js node_modules/juggler-v3/test.js node_modules/juggler-v4/test.js","posttest":"npm run lint"},"dependencies":{"async":"^3.2.0","debug":"^4.1.1","lodash":"^4.17.11","loopback-connector":"^5.0.0","mysql":"^2.11.1","strong-globalize":"^6.0.4"},"devDependencies":{"eslint":"^7.7.0","eslint-config-loopback":"^13.1.0","juggler-v3":"file:./deps/juggler-v3","juggler-v4":"file:./deps/juggler-v4","@aaqilniz/loopback-datasource-juggler":"4.27.3","mocha":"^8.1.2","rc":"^1.0.0","should":"^13.2.3","sinon":"^9.0.3","@commitlint/config-conventional":"^12.1.4"},"repository":{"type":"git","url":"git+https://github.com/loopbackio/loopback-connector-mysql.git"},"license":"MIT","author":{"name":"IBM Corp."},"gitHead":"21e3bba4c4f58435b6a15ab33c85657eec3f88b1","bugs":{"url":"https://github.com/loopbackio/loopback-connector-mysql/issues"},"homepage":"https://github.com/loopbackio/loopback-connector-mysql#readme","_id":"@aaqilniz/loopback-connector-mysql@6.1.1","_nodeVersion":"16.13.0","_npmVersion":"8.5.3","dist":{"integrity":"sha512-q+8t/7tv6T5ZUNm7Dck6pj0TRrZ3kHS7XZHgD3a20GhFDsKxfejDNLZtwhXrsHOmvqtBatc073JrsO2jcmEwXQ==","shasum":"cba6bec6623579caef5780cd84da74839d63355d","tarball":"https://registry.npmjs.org/@aaqilniz/loopback-connector-mysql/-/loopback-connector-mysql-6.1.1.tgz","fileCount":23,"unpackedSize":106690,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCTvrrS+WPgxCTInZR5nfHDyJd/R0/vO/ZIO2YAMOaiQgIgbzjGjRofMU08iTcJWhZKGuXzvRiQmWNqOMtBD5law4Y="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYSLHACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrqcA/+NG0C+sxeO2pBA9TRVgP4Zbr7BltXvIBF/D6KYhgF6o2B2RLp\r\nouacDigFCeOPem+WW7F9kPzXX3lcA/agj6XFwweYJUe10Vgw+YjqOsZQmSIJ\r\nesdg4oaD76MvwKyUdnoYBvLosRzN6jb42dR4Nf1iirceeiTDuYxLQhp8iw3p\r\nspzuXr8HlR6BYWCmZZ6ugWZJoqEPaPeaD3oQgKyU1c2KudMOgtSS/QBdI0lM\r\ntgmpDFnEBSY2KssuIKhVaB0Tu2H97X75dJoUkjiTdXyo365Mw8vXJjJula2I\r\neUrW/IltXZsZabLl27g2lvYFq2G9jw8lAvhfCkaHIeQ0j2zhnrY3BeBZzPmC\r\nprAWYnQBg0lb80kbY04NC8jCwPCeGKXXm6pTCOzFfJVEj7q9sa7h09zQaNev\r\nBnH4SLsukaNm65MA/F1NB9Tk/GZnRb/LCnLkvQBvehmC3jCvRdi7vamWKBrB\r\nY/VMd0lNGiZhW0GizCfjhtDBmo0IEE54c7DSdp50Xz98KYqLgDI2WK957ATU\r\ntGZkI6VUxFJ/ypOp4XjyW7isOVrlk9u35gFI3SGvq6bwpLyG06WbaGFVgfhv\r\n3NA5QBWgyIK3JX2gXBHI2RXcsndGstqLOlPCreycchDmnGLt8XoXQwSHT3vP\r\ndcGusEA0MYieRRz9C8PJNmjdYc4ps17gtOc=\r\n=Ngl1\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aaqilniz","email":"aaqilniz@yahoo.com"},"directories":{},"maintainers":[{"name":"aaqilniz","email":"aaqilniz@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/loopback-connector-mysql_6.1.1_1667310279216_0.8859549180868702"},"_hasShrinkwrap":false},"6.1.2":{"name":"@aaqilniz/loopback-connector-mysql","version":"6.1.2","description":"MySQL connector for loopback-datasource-juggler","engines":{"node":">=10"},"main":"index.js","scripts":{"pretest":"node pretest.js","lint":"eslint .","test":"mocha test/*.test.js node_modules/juggler-v3/test.js node_modules/juggler-v4/test.js","posttest":"npm run lint"},"dependencies":{"async":"^3.2.0","debug":"^4.1.1","lodash":"^4.17.11","loopback-connector":"^5.0.0","mysql":"^2.11.1","strong-globalize":"^6.0.4"},"devDependencies":{"eslint":"^7.7.0","eslint-config-loopback":"^13.1.0","juggler-v3":"file:./deps/juggler-v3","juggler-v4":"file:./deps/juggler-v4","@aaqilniz/loopback-datasource-juggler":"4.27.5","mocha":"^8.1.2","rc":"^1.0.0","should":"^13.2.3","sinon":"^9.0.3","@commitlint/config-conventional":"^12.1.4"},"repository":{"type":"git","url":"git+https://github.com/loopbackio/loopback-connector-mysql.git"},"license":"MIT","author":{"name":"IBM Corp."},"gitHead":"21e3bba4c4f58435b6a15ab33c85657eec3f88b1","bugs":{"url":"https://github.com/loopbackio/loopback-connector-mysql/issues"},"homepage":"https://github.com/loopbackio/loopback-connector-mysql#readme","_id":"@aaqilniz/loopback-connector-mysql@6.1.2","_nodeVersion":"16.13.0","_npmVersion":"8.5.3","dist":{"integrity":"sha512-So61o0tEqcEjS7OTBeTAI4Bng+rteQxtNStUSGpfEuFnXA8/0O6em1U3WN6xU+gOp95zYiRkLLdVli/K2g5qVg==","shasum":"adc7841c6f51393e38b4678d000e0a8d3c65d4fe","tarball":"https://registry.npmjs.org/@aaqilniz/loopback-connector-mysql/-/loopback-connector-mysql-6.1.2.tgz","fileCount":23,"unpackedSize":106690,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIDq8vUlw+GhK6NrJJXPEEA365OLwFjQmBgC5QSJqlf2rAiAAhXUQzxwZ6GolpLXGyycq98Wwk8YL4WIvGq4QENA6lQ=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYSeRACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmrTkQ/9ERkCJlPbj4OfpX+Gji1CjLsiCsW2pSMYcoUyaPN0AfZUzp9u\r\nmx9AYe3rsY0ogJWKPE7pDMQSCbh+/89q3V/m/Ux9yQcOe6cae5H6+ZlGtWf/\r\nquUVHtKSgXrXM/jVqs/aUqPXejyG9IjQkzV/dBlHYRl4oVedqD06TD4lWG9J\r\njU8bPiuoDM0BNLIxR7cT9pElTN4Nqh5ulCN5nLoU6XLh33nwA2wJ4HWg4g+S\r\nJtZxEDDsYmgOimHssKxsfk8XRSO8xw6Lqvo6Hi1U4Dhj8clV9aLw1Ja1kdxh\r\nz/REfd2dp8mkFtURhMyZVCJ37Ji6cE6jC412orxGE2oSWb8ry0MBClI+K3l6\r\nwZrElUwsYvaALcD6G/MrNzuFFDzuZc2bv1n5yo4h67INPvTI1DoMXp1rArL/\r\nxD7dvOd5HMFvlrCe7EqS70qPiTIh5Ai1oK42NXfl1QxlngOAFp62yUgUe0F2\r\n3NOWJBI4hIS2MHT9r/ueDcGPQFd97Dsn2KGw6KLdewGW8qkRBl00v5fhz1Ay\r\nnQxKt7voqJqGaZaJHxM13zaCQ3AR8xQ1t54jxdXyF9aHo+k54f008LD/zFVG\r\nBLhn5e15C33yyhfWKCjVQarXm/U3qK1s0HJYHr8fJ4DkdD4U165SMHnUOih+\r\nVZq7q5fcIn6YLtj6dSk+6nln6hRDc+SwVDs=\r\n=kEZY\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aaqilniz","email":"aaqilniz@yahoo.com"},"directories":{},"maintainers":[{"name":"aaqilniz","email":"aaqilniz@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/loopback-connector-mysql_6.1.2_1667311505419_0.31365521334497193"},"_hasShrinkwrap":false},"6.1.3":{"name":"@aaqilniz/loopback-connector-mysql","version":"6.1.3","description":"MySQL connector for loopback-datasource-juggler","engines":{"node":">=10"},"main":"index.js","scripts":{"pretest":"node pretest.js","lint":"eslint .","test":"mocha test/*.test.js node_modules/juggler-v3/test.js node_modules/juggler-v4/test.js","posttest":"npm run lint"},"dependencies":{"async":"^3.2.0","debug":"^4.1.1","lodash":"^4.17.11","loopback-connector":"^5.0.0","mysql":"^2.11.1","strong-globalize":"^6.0.4"},"devDependencies":{"eslint":"^7.7.0","eslint-config-loopback":"^13.1.0","juggler-v3":"file:./deps/juggler-v3","juggler-v4":"file:./deps/juggler-v4","loopback-datasource-juggler-aaqilniz":"4.27.5","mocha":"^8.1.2","rc":"^1.0.0","should":"^13.2.3","sinon":"^9.0.3","@commitlint/config-conventional":"^12.1.4"},"repository":{"type":"git","url":"git+https://github.com/loopbackio/loopback-connector-mysql.git"},"license":"MIT","author":{"name":"IBM Corp."},"gitHead":"21e3bba4c4f58435b6a15ab33c85657eec3f88b1","bugs":{"url":"https://github.com/loopbackio/loopback-connector-mysql/issues"},"homepage":"https://github.com/loopbackio/loopback-connector-mysql#readme","_id":"@aaqilniz/loopback-connector-mysql@6.1.3","_nodeVersion":"16.13.0","_npmVersion":"8.5.3","dist":{"integrity":"sha512-YwnpuF4Ce3zl3BmH6MkaUrEyp9nptIp4rZYlnyf2wBSgXAOu4Kz+95oSL7ocguobBXijmaMcnqwOmYEWaSMD5A==","shasum":"3911ed73bb6b57b976b9f0ac179dcbece278dbd7","tarball":"https://registry.npmjs.org/@aaqilniz/loopback-connector-mysql/-/loopback-connector-mysql-6.1.3.tgz","fileCount":23,"unpackedSize":106689,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIADbMrRXxM2RStb4Zwgr0taT7LpJxQwpD3wZjY1EGMKPAiAHXOvZOdf/A8RxIGtjkChM4GtcK5P9YECX2CvykvPYAw=="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYSqVACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmpQIhAAjD7Hemo2gPmGj6snHwpxZPgX/eFeOHA2o+R7pTjAD9upF+g8\r\nnL99Hntl9U9QBTZXnX6iWJDwL4ic02UAWDUz84QP4akPXLEixVaB77vI8LlL\r\nNbdRr7SYfbZj9tOKSDzf783GMAlWn9JETlHZE1pRHRq1/xU7iU9uI0netDf5\r\n+6ZPaHKlRW35XydQ6HaKWtl4EG4P7b7dPQeQbIlHOoA6wSobJj9p7RNngkge\r\nm/BT+cyaMKyQRpi/WulxqaEiedspB/yN1E4gTptv/jM4mV+fiSiUc60thtDs\r\n7+HR3xu7zuDTUX01OpTpLhc5p2GJpAd2IyrEv5TiMgOqAdGA+8pIcbpA8Ixc\r\nJVut15aoTxwje9LdcJIzhI2cUtLhBOmXbqhUGnZP4m6+PIGNf4ITqG7ddRRk\r\nqtHl0sTNAO99LmC9tiasG/yGV/6Pe1ZqOIHKWMKtsODpDFTgeZ0GkZ7oqVb4\r\nrCaWhz72LZE6KE6+DbMMzDhwZQ3Wg0IgXch5qJXP+zxmp2TgN+I+9tEga8FR\r\nXOuIryjJOT2fvn62WIW82XN8hdm2GRyiqaocIJppDp2V+ZEX3kQZgvC3XMZe\r\nDw2O3ILImtKyzkAwbIQC2NuWcde0RB04IM7PPeODchOvx65yPA+dkgciOVPJ\r\nj180Kmi0TzRKQAD/GjzF2blh9cg4yW/foVs=\r\n=hOUs\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aaqilniz","email":"aaqilniz@yahoo.com"},"directories":{},"maintainers":[{"name":"aaqilniz","email":"aaqilniz@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/loopback-connector-mysql_6.1.3_1667312276814_0.6586822359321081"},"_hasShrinkwrap":false},"6.1.4":{"name":"@aaqilniz/loopback-connector-mysql","version":"6.1.4","description":"MySQL connector for loopback-datasource-juggler","engines":{"node":">=10"},"main":"index.js","scripts":{"pretest":"node pretest.js","lint":"eslint .","test":"mocha test/*.test.js node_modules/juggler-v3/test.js node_modules/juggler-v4/test.js","posttest":"npm run lint"},"dependencies":{"async":"^3.2.0","debug":"^4.1.1","lodash":"^4.17.11","@aaqilniz/loopback-connector":"^5.1.0","mysql":"^2.11.1","strong-globalize":"^6.0.4"},"devDependencies":{"eslint":"^7.7.0","eslint-config-loopback":"^13.1.0","juggler-v3":"file:./deps/juggler-v3","juggler-v4":"file:./deps/juggler-v4","@aaqilniz/loopback-datasource-juggler":"4.27.6","mocha":"^8.1.2","rc":"^1.0.0","should":"^13.2.3","sinon":"^9.0.3","@commitlint/config-conventional":"^12.1.4"},"repository":{"type":"git","url":"git+https://github.com/loopbackio/loopback-connector-mysql.git"},"license":"MIT","author":{"name":"IBM Corp."},"gitHead":"21e3bba4c4f58435b6a15ab33c85657eec3f88b1","bugs":{"url":"https://github.com/loopbackio/loopback-connector-mysql/issues"},"homepage":"https://github.com/loopbackio/loopback-connector-mysql#readme","_id":"@aaqilniz/loopback-connector-mysql@6.1.4","_nodeVersion":"16.13.0","_npmVersion":"8.5.3","dist":{"integrity":"sha512-nbSmTX7nJ6tAYTQo04V6Qor9LoESw+hwMA3iocstd2y6N3AXxO1c7B84Mf/E/b3+PDtf3N4AdNDdRvXUrSLHug==","shasum":"7fe8817c70352ce8f156ce41df767ab69034dafb","tarball":"https://registry.npmjs.org/@aaqilniz/loopback-connector-mysql/-/loopback-connector-mysql-6.1.4.tgz","fileCount":23,"unpackedSize":106710,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICe3QuUhTj3/2CaG9PyPuzcHRy/Ple/SsX2U7exJg/wuAiEAuqRx4WAxC3Ci9c17l6y2MGVoNtxoGooddgV2qiIvInw="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjYTB7ACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2Vmp5RQ/+JCugkYWmPLp2fbTTVEkdXpHgV0n1AibBRjrtSJZqwtHrBtIa\r\n3Wd+ndDkVUgaQMXLlj2EMFzdJZlcXwQpKMqtaVYhn69V05CSeelKPUzAeVhg\r\nzl0yr3g9olGkylhJ/8DxJ5K3CxKEv/Ay18VnHj9DQV54cwH2IKBveXHx1yfV\r\nyHCKlY5wNY2LRwsScK+NlTRRR0CfEY1jzFpM+UKhObggF2LyB6+qlg/juX1d\r\nIYcSQxIUhrWkUvSj/+LkqZKZMR0KSHBjgR+dCiev3Ud2IWJv5Ip3RBfzMaDy\r\nMVGvFxab2/boRKBtvj+RlNuBtGxUUDKoYzM+zgBHh4THvwQ0r/sTzYgSxM5K\r\nrzYC75SwUFC+sqYaxZqA0vbxL3LaVDGSvn4u4bnwvgG1Au7fUTzDnqlntncv\r\ndPBjxUaxNyAZXKuZ+kWkYea0oFAf05EbLfq3Xi/A7x6TLCApNYZBpJEC7Ufo\r\nxKvDDrGyjPg7QcxR6H8bl2lekmQ82fSGFH7eFu/Oo2oqjC/bYl+G7ivW78Oa\r\n6hq3KVlAWDSYAIbEtyw/NRpd6igXD+nVMN9ymDMBMLVSMjZgNmWuUB4mLWUy\r\ninXYqpJE92DTpJRiJZKAHnFY8dmNRpAhwSGZlQagVP+I/Oa7/ovu/LYBZ9fw\r\njpLjz4OS91zxdQ5cf7c7Gjzb3q1QtHpDmZk=\r\n=tK9o\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aaqilniz","email":"aaqilniz@yahoo.com"},"directories":{},"maintainers":[{"name":"aaqilniz","email":"aaqilniz@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/loopback-connector-mysql_6.1.4_1667313787327_0.11774268495802875"},"_hasShrinkwrap":false},"6.1.5":{"name":"@aaqilniz/loopback-connector-mysql","version":"6.1.5","description":"MySQL connector for loopback-datasource-juggler","engines":{"node":">=10"},"main":"index.js","scripts":{"pretest":"node pretest.js","lint":"eslint .","test":"mocha test/*.test.js node_modules/juggler-v3/test.js node_modules/juggler-v4/test.js","posttest":"npm run lint"},"dependencies":{"async":"^3.2.0","debug":"^4.1.1","lodash":"^4.17.11","loopback-connector":"^5.0.0","mysql":"^2.11.1","strong-globalize":"^6.0.4"},"devDependencies":{"eslint":"^7.7.0","eslint-config-loopback":"^13.1.0","juggler-v3":"file:./deps/juggler-v3","juggler-v4":"file:./deps/juggler-v4","@aaqilniz/loopback-datasource-juggler":"4.27.7","mocha":"^8.1.2","rc":"^1.0.0","should":"^13.2.3","sinon":"^9.0.3","@commitlint/config-conventional":"^12.1.4"},"repository":{"type":"git","url":"git+https://github.com/loopbackio/loopback-connector-mysql.git"},"license":"MIT","author":{"name":"IBM Corp."},"gitHead":"3e0e9263c47d267d6e0f914a26810fc932c22141","bugs":{"url":"https://github.com/loopbackio/loopback-connector-mysql/issues"},"homepage":"https://github.com/loopbackio/loopback-connector-mysql#readme","_id":"@aaqilniz/loopback-connector-mysql@6.1.5","_nodeVersion":"16.13.0","_npmVersion":"8.5.3","dist":{"integrity":"sha512-m2RJr+ghsR7XZ/TVipUI9Us9DwGfH5HVXia/3Pp6Y2ufYlnfR3IKflobjHYQCbzCGscCoSk0z8PkkNL8hXtAxg==","shasum":"7c9a357c3d1ac2e146ff9bd159300528923289bb","tarball":"https://registry.npmjs.org/@aaqilniz/loopback-connector-mysql/-/loopback-connector-mysql-6.1.5.tgz","fileCount":23,"unpackedSize":106690,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIFn+WwWmY2d8xnvmAVJssOAztKLmmHLWS1KU/emm7DolAiEA1pyKEH5tgd4O2j+DAYZIPe6sFqFY0yfuXju4+FoHM8k="}],"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v4.10.10\r\nComment: https://openpgpjs.org\r\n\r\nwsFzBAEBCAAGBQJjZgEEACEJED1NWxICdlZqFiEECWMYAoorWMhJKdjhPU1b\r\nEgJ2VmraSg//VVP9Vgtooxxa957Fb8fBgHrolCovrN0v2ZT9Ps22bVixOnHZ\r\nqnP92bwqJXsx0oZUnxVTXN/pvB7HhY9qn/MDFPkSqZLit+7PSKPsk8STeGAl\r\nIkjgYOutx03RCd2+3PZLHcO4s/F6mwiWsBvZVNu6fZQrGLumcZRcZRIWfkOG\r\nvsWBB0cKCp/oAdenDKA6UglgSgjDdjNncO302TedaiWnV4hdZUaPU61VJVd0\r\nM8y7RwkbStHxs7Qq1mqImqVYeDB9vaETlLNWSKLBJ0R2yCyjeSKxZcrNyop/\r\nU9JuCiNHnky9qDGTAwLl3sJOuMjltjlopGeNpAOUM78MZGMQChXKYY5BxW81\r\n/J0VK2BFEJRd7YCl56+PXZbewzUqYn6YL4T/D9r1vDHIG74LzDGvVGBDYf6g\r\n02seVI3tONCPgK/uGCnnl/Ingxyz7ONIt3EbzOvAZo8TXhbO30LXaSEVTW8Y\r\n5B2tOizkfK79D4SfXNw+tevR5s6IXST6mE2YChL9GZIMsV9V9WU6/EqcA8IZ\r\nIvuYBJm0hEr/FFpLqh7ZJHuGRje+FQ6g8d+wxwgVeQS3n7VZxTmhm65vjq60\r\nL4WMgQQGkgX6glXGEt88yqYDOgEF+DcdB3/iKC1Try3fL2nqrW37fFflnl9r\r\nU/oO2VFFbzLRFGEYKASgU14ensLftb/C/Kk=\r\n=wVu+\r\n-----END PGP SIGNATURE-----\r\n"},"_npmUser":{"name":"aaqilniz","email":"aaqilniz@yahoo.com"},"directories":{},"maintainers":[{"name":"aaqilniz","email":"aaqilniz@yahoo.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/loopback-connector-mysql_6.1.5_1667629316334_0.38437524202094164"},"_hasShrinkwrap":false}},"time":{"created":"2022-11-01T12:39:24.859Z","6.1.0":"2022-11-01T12:39:25.108Z","modified":"2022-11-05T06:21:56.607Z","6.1.1":"2022-11-01T13:44:39.389Z","6.1.2":"2022-11-01T14:05:05.629Z","6.1.3":"2022-11-01T14:17:57.028Z","6.1.4":"2022-11-01T14:43:07.512Z","6.1.5":"2022-11-05T06:21:56.503Z"},"maintainers":[{"name":"aaqilniz","email":"aaqilniz@yahoo.com"}],"description":"MySQL connector for loopback-datasource-juggler","homepage":"https://github.com/loopbackio/loopback-connector-mysql#readme","repository":{"type":"git","url":"git+https://github.com/loopbackio/loopback-connector-mysql.git"},"author":{"name":"IBM Corp."},"bugs":{"url":"https://github.com/loopbackio/loopback-connector-mysql/issues"},"license":"MIT","readme":"# loopback-connector-mysql\n\n[MySQL](https://www.mysql.com/) is a popular open-source relational database\nmanagement system (RDBMS). The `loopback-connector-mysql` module provides the\nMySQL connector module for the LoopBack framework.\n\n## Installation\n\nIn your application root directory, enter this command to install the connector:\n\n```sh\nnpm install loopback-connector-mysql --save\n```\n\n**Note**: The MySQL connector requires MySQL 5.0+.\n\nThis installs the module from npm and adds it as a dependency to the\napplication's `package.json` file.\n\nIf you create a MySQL data source using the data source generator as described\nbelow, you don't have to do this, since the generator will run `npm install` for\nyou.\n\n## Creating a MySQL data source\n\nFor LoopBack 4 users, use the LoopBack 4\n[Command-line interface](https://loopback.io/doc/en/lb4/Command-line-interface.html)\nto generate a DataSource with MySQL connector to your LB4 application. Run\n[`lb4 datasource`](https://loopback.io/doc/en/lb4/DataSource-generator.html), it\nwill prompt for configurations such as host, post, etc. that are required to\nconnect to a MySQL database.\n\nAfter setting it up, the configuration can be found under\n`src/datasources/<DataSourceName>.datasource.ts`, which would look like this:\n\n```ts\nconst config = {\n  name: 'db',\n  connector: 'mysql',\n  url: '',\n  host: 'localhost',\n  port: 3306,\n  user: 'user',\n  password: 'pass',\n  database: 'testdb',\n};\n```\n\n<details><summary markdown=\"span\"><strong>For LoopBack 3 users</strong></summary>\n\nUse\nthe [Data source generator](http://loopback.io/doc/en/lb3/Data-source-generator.html) to\nadd a MySQL data source to your application.  \nThe generator will prompt for the database server hostname, port, and other\nsettings required to connect to a MySQL database. It will also run the\n`npm install` command above for you.\n\nThe entry in the application's `/server/datasources.json` will look like this:\n\n```javascript\n\"mydb\": {\n  \"name\": \"mydb\",\n  \"connector\": \"mysql\",\n  \"host\": \"myserver\",\n  \"port\": 3306,\n  \"database\": \"mydb\",\n  \"password\": \"mypassword\",\n  \"user\": \"admin\"\n }\n```\n\n</details>\n\nEdit `<DataSourceName>.datasources.ts` to add any other additional properties\nthat you require.\n\n### Properties\n\n<table>\n  <thead>\n    <tr>\n      <th width=\"150\">Property</th>\n      <th width=\"80\">Type</th>\n      <th>Description</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>collation</td>\n      <td>String</td>\n      <td>Determines the charset for the connection.  Default is utf8_general_ci.</td>\n    </tr>\n    <tr>\n      <td>connector</td>\n      <td>String</td>\n      <td>Connector name, either “loopback-connector-mysql” or “mysql”.</td>\n    </tr>\n    <tr>\n      <td>connectionLimit</td>\n      <td>Number</td>\n      <td>The maximum number of connections to create at once.  Default is 10.</td>\n    </tr>\n    <tr>\n      <td>database</td>\n      <td>String</td>\n      <td>Database name</td>\n    </tr>\n    <tr>\n      <td>debug</td>\n      <td>Boolean</td>\n      <td>If true, turn on verbose mode to debug database queries and lifecycle.</td>\n    </tr>\n    <tr>\n      <td>host</td>\n      <td>String</td>\n      <td>Database host name</td>\n    </tr>\n    <tr>\n      <td>password</td>\n      <td>String</td>\n      <td>Password to connect to database</td>\n    </tr>\n    <tr>\n      <td>port</td>\n      <td>Number</td>\n      <td>Database TCP port</td>\n    </tr>\n    <tr>\n      <td>socketPath</td>\n      <td>String</td>\n      <td>The path to a unix domain socket to connect to. When used host and port are ignored.</td>\n    </tr>\n    <tr>\n      <td>supportBigNumbers</td>\n      <td>Boolean</td>\n      <td>Enable this option to deal with big numbers (BIGINT and DECIMAL columns) in the database. Default is false.</td>\n    </tr>\n    <tr>\n      <td>timeZone</td>\n      <td>String</td>\n      <td>The timezone used to store local dates.  Default is ‘local’.</td>\n    </tr>\n    <tr>\n      <td>url</td>\n      <td>String</td>\n      <td>Connection URL of form <code>mysql://user:password@host/db</code>.  Overrides other connection settings.</td>\n    </tr>\n    <tr>\n      <td>username</td>\n      <td>String</td>\n      <td>Username to connect to database</td>\n    </tr>\n    <tr>\n      <td>allowExtendedOperators</td>\n      <td>Boolean</td>\n      <td>Set to <code>true</code> to enable MySQL-specific operators\n          such as <code>match</code>. Learn more in\n          <a href=\"#extended-operators\">Extended operators</a> below.\n      </td>\n    </tr>\n  </tbody>\n</table>\n\n**NOTE**: In addition to these properties, you can use additional parameters\nsupported by [`node-mysql`](https://github.com/felixge/node-mysql).\n\n## Type mappings\n\nSee [LoopBack 4 types](http://loopback.io/doc/en/lb4/LoopBack-types.html) (or [LoopBack 3 types](http://loopback.io/doc/en/lb3/LoopBack-types.html)) for\ndetails on LoopBack's data types.\n\n### LoopBack to MySQL types\n\n<table>\n  <thead>\n    <tr>\n      <th width=\"450\">LoopBack Type</th>\n      <th width=\"450\">MySQL Type</th>\n    </tr>\n  </thead>\n  <tbody>    \n    <tr>\n      <td>String/JSON</td>\n      <td>VARCHAR</td>\n    </tr>\n    <tr>\n      <td>Text</td>\n      <td>TEXT</td>\n    </tr>\n    <tr>\n      <td>Number</td>\n      <td>INT</td>\n    </tr>\n    <tr>\n      <td>Date</td>\n      <td>DATETIME</td>\n    </tr>\n    <tr>\n      <td>Boolean</td>\n      <td>TINYINT(1)</td>\n    </tr>\n    <tr>\n      <td><a href=\"http://apidocs.strongloop.com/loopback-datasource-juggler/#geopoint\" class=\"external-link\">GeoPoint</a> object</td>\n      <td>POINT</td>\n    </tr>\n    <tr>\n      <td>Custom Enum type<br>(See <a href=\"#enum\">Enum</a> below)</td>\n      <td>ENUM</td>\n    </tr>\n  </tbody>\n</table>\n\n### MySQL to LoopBack types\n\n<table>\n  <thead>\n    <tr>\n      <th width=\"450\">MySQL Type</th>\n      <th width=\"450\">LoopBack Type</th>\n    </tr>\n  </thead>\n  <tbody>\n    <tr>\n      <td>CHAR</td>\n      <td>String</td>\n    </tr>\n    <tr>\n      <td>BIT(1)<br>CHAR(1)<br>TINYINT(1)</td>\n      <td>Boolean</td>\n    </tr>\n    <tr>\n      <td>VARCHAR<br>TINYTEXT<br>MEDIUMTEXT<br>LONGTEXT<br>TEXT<br>ENUM<br>SET</td>\n      <td>String</td>\n    </tr>\n    <tr>\n      <td>TINYBLOB<br>MEDIUMBLOB<br>LONGBLOB<br>BLOB<br>BINARY<br>VARBINARY<br>BIT</td>\n      <td>Node.js <a href=\"http://nodejs.org/api/buffer.html\">Buffer object</a></td>\n    </tr>\n    <tr>\n      <td>TINYINT<br>SMALLINT<br>INT<br>MEDIUMINT<br>YEAR<br>FLOAT<br>DOUBLE<br>NUMERIC<br>DECIMAL</td>\n      <td>\n        <p>Number<br>For FLOAT and DOUBLE, see <a href=\"#floating-point-types\">Floating-point types</a>. </p>\n        <p>For NUMERIC and DECIMAL, see <a href=\"MySQL-connector.html\">Fixed-point exact value types</a></p>\n      </td>\n    </tr>\n    <tr>\n      <td>DATE<br>TIMESTAMP<br>DATETIME</td>\n      <td>Date</td>\n    </tr>\n  </tbody>\n</table>\n\n_NOTE_ as of v3.0.0 of MySQL Connector, the following flags were introduced:\n\n- `treatCHAR1AsString` default `false` - treats CHAR(1) as a String instead of a\n  Boolean\n- `treatBIT1AsBit` default `true` - treats BIT(1) as a Boolean instead of a\n  Binary\n- `treatTINYINT1AsTinyInt` default `true` - treats TINYINT(1) as a Boolean\n  instead of a Number\n\n## Data mapping properties\n\nExcept the common database-specific properties we introduce in [How LoopBack Models Map To Database Tables/Collections](https://loopback.io/doc/en/lb4/Model.html#how-loopback-models-map-to-database-tablescollections), the following are more detailed examples and MySQL-specific settings.\n\n### Table/Column Names\n\nBesides the basic LoopBack types, as we introduced above, you can also specify\nadditional MySQL-specific properties for a LoopBack model. It would be mapped to\nthe database.\n\nUse the `mysql.<property>` in the model definition or the property definition to\nconfigure the table/column definition.\n\nFor example, the following settings would allow you to have custom table name\n(`Custom_User`) and column name (`custom_id` and `custom_name`). Such mapping is\nuseful when you'd like to have different table/column names from the model:\n\n{% include code-caption.html content=\"user.model.ts\" %}\n\n```ts\n@model({\n  settings: { mysql: { schema: 'testdb', table: 'Custom_User'} },\n})\nexport class User extends Entity {\n  @property({\n    type: 'number',\n    required: true,\n    id: true,\n    mysql: {\n      columnName: 'custom_id',\n    },\n  })\n  id: number;\n\n  @property({\n    type: 'string',\n    mysql: {\n      columnName: 'custom_name',\n    },\n  })\n  name?: string;\n```\n\n<details><summary markdown=\"span\"><strong>For LoopBack 3 users</strong></summary>\n\n```javascript\n{\n  \"name\": \"User\",\n  \"options\": {\n    \"mysql\": {\n      \"schema\": \"testdb\",\n      \"table\": \"Custom_User\"\n    }\n  },\n  \"properties\": {\n    \"id\": {\n      \"type\": \"Number\",\n      \"required\": true,\n      \"mysql\": {\n        \"columnName\": \"custom_id\",\n      }\n    },\n    \"name\": {\n      \"type\": \"String\",\n      \"mysql\": {\n        \"columnName\": \"custom_name\",\n      }\n    },\n  }\n}\n```\n\n</details>\n\n### Numeric Types\n\nExcept the names, you can also use the dataType column/property attribute to\nspecify what MySQL column type to use. The following MySQL type-dataType\ncombinations are supported:\n\n- number\n- integer\n- tinyint\n- smallint\n- mediumint\n- int\n- bigint\n- float\n- double\n- decimal\n\nThe following examples will be in LoopBack 4 style, but it's the same if you\nprovide `mysql.<property>` to the LB3 property definition.\n\n#### Floating-point types\n\nFor Float and Double data types, use the `precision` and `scale` options to\nspecify custom precision. Default is (16,8).\n\n<details><summary markdown=\"span\"><strong>Example</strong></summary>\n\n```ts\n@property({\n  type: 'Number',\n  mysql: {\n    dataType: 'float',\n    precision: 20,\n    scale: 4\n  }\n})\nprice: Number;\n```\n\n</details>\n\n#### Fixed-point exact value types\n\nFor Decimal and Numeric types, use the `precision` and `scale` options to\nspecify custom precision. Default is (9,2). These aren't likely to function as\ntrue fixed-point.\n\n<details><summary markdown=\"span\"><strong>Example</strong></summary>\n\n```ts\n@property({\n  type: 'Number',\n  mysql: {\n    dataType: 'decimal',\n    precision: 12,\n    scale: 8\n  }\n})\nprice: Number;\n```\n\n</details>\n\n### Text types\n\nConvert String / DataSource.Text / DataSource.JSON to the following MySQL types:\n\n- varchar\n- char\n- text\n- mediumtext\n- tinytext\n- longtext\n\n<details><summary markdown=\"span\"><strong>Example</strong></summary>\n\n```ts\n@property({\n  type: 'String',\n  mysql: {\n    dataType: 'char',\n    dataLength: 24 // limits the property length\n  },\n})\nuserName: String;\n```\n\n</details>\n\n### Dat types\n\nConvert JSON Date types to datetime or timestamp.\n\n<details><summary markdown=\"span\"><strong>Example</strong></summary>\n\n```ts\n@property({\n  type: 'Date',\n  mysql: {\n    dataType: 'timestamp',\n  },\n})\nstartTime: Date;\n```\n\n</details>\n\n### Enum\n\nSee the [Model ENUM property](https://loopback.io/doc/en/lb4/Model.html#enum-property) for details. \n\n### Default Clause/Constant\n\nUse the `default` and `dataType` properties to have MySQL handle **setting column `DEFAULT` value**.\n\n<details><summary markdown=\"span\"><strong>Example</strong></summary>\n\n```ts\n@property({\n  type: 'String',\n  mysql: {\n    dataType: 'varchar',\n    default: 'pending'\n  }\n})\nstatus: String;\n\n@property({\n  type: 'Number',\n  mysql: {\n    dataType: 'int',\n    default: 42\n  }\n})\nmaxDays: Number;\n\n@property({\n  type: 'boolean',\n  mysql: {\n    dataType: 'tinyint',\n    default: 1\n  }\n})\nisDone: Boolean;\n```\n\n</details>\n\nFor the date or timestamp types use `CURRENT_TIMESTAMP` or `now`.\n\n<details><summary markdown=\"span\"><strong>Example</strong></summary>\n\n```ts\n@property({\n  type: 'Date',\n  mysql: {\n    dataType: 'datetime',\n    default: 'CURRENT_TIMESTAMP'\n  }\n})\nlast_modified: Date;\n```\n\n</details>\n\n**NOTE**: The following column types do **NOT** supported\n[MySQL Default Values](https://dev.mysql.com/doc/refman/5.7/en/data-type-defaults.html):\n\n- BLOB\n- TEXT\n- GEOMETRY\n- JSON\n\n## Extended operators\nMySQL connector supports the following MySQL-specific operators:\n- [`match`](#operator-match)\nPlease note extended operators are disabled by default, you must enable\nthem at datasource level or model level by setting `allowExtendedOperators` to\n`true`.\n### Operator `match`\nThe `match` operator allows you to perform a full text search using the [MATCH() .. AGAINST()](https://dev.mysql.com/doc/refman/8.0/en/fulltext-search.html) operator in MySQL.\n\nThree different modes of the `MATCH` clause are also available in the form of operators - \n\n- `matchbool` for [Boolean Full Text Search](https://dev.mysql.com/doc/refman/8.0/en/fulltext-boolean.html)\n- `matchnl` for [Natural Language Full Text Search](https://dev.mysql.com/doc/refman/8.0/en/fulltext-natural-language.html)\n- `matchqe` for [Full-Text Searches with Query Expansion](https://dev.mysql.com/doc/refman/8.0/en/fulltext-query-expansion.html)\n- `matchnlqe` for [Full-Text Searches with Query Expansion](https://dev.mysql.com/doc/refman/8.0/en/fulltext-query-expansion.html) with the `IN NATURAL LANGUAGE MODE WITH QUERY EXPANSION` modifier.\n\nBy default, the `match` operator works in Natural Language mode.\n\n**Note** The fields you are querying must be setup with a `FULLTEXT` index to perform full text search on them.\nAssuming a model such as this:\n```ts\n@model({\n  settings: {\n    allowExtendedOperators: true,\n  }\n})\nclass Post {\n  @property({\n    type: 'string',\n    mysql: {\n      index: {\n        kind: 'FULLTEXT'\n      }\n    },\n  })\n  content: string;\n}\n```\nYou can query the content field as follows:\n```ts\nconst posts = await postRepository.find({\n  where: {\n    {\n      content: {match: 'someString'},\n    }\n  }\n});\n```\n\n## Discovery and auto-migration\n\n### Model discovery\n\nThe MySQL connector supports _model discovery_ that enables you to create\nLoopBack models based on an existing database schema. Once you defined your\ndatasource:\n\n- LoopBack 4 users could use the commend\n  [`lb4 discover`](https://loopback.io/doc/en/lb4/Discovering-models.html) to\n  discover models.\n- For LB3 users, please check\n  [Discovering models from relational databases](https://loopback.io/doc/en/lb3/Discovering-models-from-relational-databases.html).\n  (See\n  [database discovery API](http://apidocs.strongloop.com/loopback-datasource-juggler/#datasource-prototype-discoverandbuildmodels)\n  for related APIs information)\n\n### Auto-migration\n\nThe MySQL connector also supports _auto-migration_ that enables you to create a\ndatabase schema from LoopBack models. For example, based on the following model,\nthe auto-migration method would create/alter existing `Customer` table in the\ndatabase. Table `Customer` would have two columns: `name` and `id`, where `id`\nis also the primary key that has `auto_increment` set as it has definition of\n`type: 'Number'` and `generated: true`:\n\n```ts\n@model()\nexport class Customer extends Entity {\n  @property({\n    id: true,\n    type: 'Number',\n    generated: true,\n  })\n  id: number;\n\n  @property({\n    type: 'string',\n  })\n  name: string;\n}\n```\n\nMoreover, additional MySQL-specific properties mentioned in the\n[Data mapping properties](#data-mapping-properties) section work with\nauto-migration as well.\n\n#### Auto-generated ids\n\nFor now LoopBack MySQL connector only supports auto-generated id\n(`generated: true`) for integer type as for MySQL, the default id type is\n_integer_. If you'd like to use other types such as string (uuid) as the id\ntype, you can:\n\n- use uuid that is **generated by your LB application** by setting\n  [`defaultFn: uuid`](https://loopback.io/doc/en/lb4/Model.html#property-decorator).\n\n```ts\n  @property({\n    id: true,\n    type: 'string'\n    defaultFn: 'uuidv4',\n    // generated: true,  -> not needed\n  })\n  id: string;\n```\n\n- Alter the table in your database to use a certain function if you prefer\n  having **the database to generate the value**.\n\n```ts\n  @property({\n    id: true,\n    type: 'string'\n    generated: true,  // to indicate the value generates by the db\n    useDefaultIdType: false,  // needed\n  })\n  id: string;\n```\n\n#### Auto-migrate/Auto-update models with foreign keys\n\nForeign key constraints can be defined in the model definition.\n\n**Note**: The order of table creation is important. A referenced table must\nexist before creating a foreign key constraint. The order can be specified \nusing the optional <a href=\"https://loopback.io/doc/en/lb4/apidocs.repository.schemamigrationoptions.html\">`SchemaMigrationOptions`</a> argument of `migrateSchema`:\n\n```\nawait app.migrateSchema({\n\tmodels: [ 'Customer', 'Order' ]\n});\n```\n\nDefine your models and the foreign key constraints as follows:\n\n{% include code-caption.html content=\"customer.model.ts\" %}\n\n```ts\n@model()\nexport class Customer extends Entity {\n  @property({\n    id: true,\n    type: 'Number',\n    generated: true,\n  })\n  id: number;\n\n  @property({\n    type: 'string',\n  })\n  name: string;\n}\n```\n\n`order.model.ts`:\n\n```ts\n@model({\n  settings: {\n    foreignKeys: {\n      fk_order_customerId: {\n        name: 'fk_order_customerId',\n        entity: 'Customer',\n        entityKey: 'id',\n        foreignKey: 'customerId',\n      },\n    },\n  })\nexport class Order extends Entity {\n  @property({\n    id: true,\n    type: 'Number',\n    generated: true\n  })\n  id: number;\n\n  @property({\n    type: 'string'\n  })\n  name: string;\n\n  @property({\n    type: 'Number'\n  })\n  customerId: number;\n}\n```\n\n<details><summary markdown=\"span\"><strong>For LoopBack 3 users</strong></summary>\n\n```json\n({\n  \"name\": \"Customer\",\n  \"options\": {\n    \"idInjection\": false\n  },\n  \"properties\": {\n    \"id\": {\n      \"type\": \"Number\",\n      \"id\": 1\n    },\n    \"name\": {\n      \"type\": \"String\",\n      \"required\": false\n    }\n  }\n},\n{\n  \"name\": \"Order\",\n  \"options\": {\n    \"idInjection\": false,\n    \"foreignKeys\": {\n      \"fk_order_customerId\": {\n        \"name\": \"fk_order_customerId\",\n        \"entity\": \"Customer\",\n        \"entityKey\": \"id\",\n        \"foreignKey\": \"customerId\"\n      }\n    }\n  },\n  \"properties\": {\n    \"id\": {\n      \"type\": \"Number\"\n      \"id\": 1\n    },\n    \"customerId\": {\n      \"type\": \"Number\"\n    },\n    \"description\": {\n      \"type\": \"String\",\n      \"required\": false\n    }\n  }\n})\n```\n\n</details>\n\nMySQL handles the foreign key integrity by the referential action specified by\n`ON UPDATE` and `ON DELETE`. You can specify which referential actions the\nforeign key follows in the model definition upon auto-migrate or auto-update\noperation. Both `onDelete` and `onUpdate` default to `restrict`.\n\nTake the example we showed above, let's add the referential action to the\nforeign key `customerId`:\n\n```ts\n@model({\n  settings: {\n    foreignKeys: {\n      fk_order_customerId: {\n        name: 'fk_order_customerId',\n        entity: 'Customer',\n        entityKey: 'id',\n        foreignKey: 'customerId',\n        onUpdate: 'restrict', // restrict|cascade|set null|no action|set default\n        onDelete: 'cascade'   // restrict|cascade|set null|no action|set default\n      },\n    },\n  })\nexport class Order extends Entity {\n...\n```\n\n<details><summary markdown=\"span\"><strong>For LoopBack 3 users</strong></summary>\n\n**model-definiton.json**\n\n```json\n{\n  \"name\": \"Customer\",\n  \"options\": {\n    \"idInjection\": false\n  },\n  \"properties\": {\n    \"id\": {\n      \"type\": \"Number\",\n      \"id\": 1\n    },\n    \"name\": {\n      \"type\": \"String\",\n      \"required\": false\n    }\n  }\n},\n{\n  \"name\": \"Order\",\n  \"options\": {\n    \"idInjection\": false,\n    \"foreignKeys\": {\n      \"fk_order_customerId\": {\n        \"name\": \"fk_order_customerId\",\n        \"entity\": \"Customer\",\n        \"entityKey\": \"id\",\n        \"foreignKey\": \"customerId\",\n        \"onUpdate\": \"restrict\",\n        \"onDelete\": \"cascade\"\n      }\n    }\n  },\n  \"properties\": {\n    \"id\": {\n      \"type\": \"Number\"\n      \"id\": 1\n    },\n    \"customerId\": {\n      \"type\": \"Number\"\n    },\n    \"description\": {\n      \"type\": \"String\",\n      \"required\": false\n    }\n  }\n}\n```\n\n**boot-script.js**\n\n```js\nmodule.exports = function (app) {\n  var mysqlDs = app.dataSources.mysqlDS;\n  var Book = app.models.Order;\n  var Author = app.models.Customer;\n\n  // first autoupdate the `Customer` model to avoid foreign key constraint failure\n  mysqlDs.autoupdate('Customer', function (err) {\n    if (err) throw err;\n    console.log('\\nAutoupdated table `Customer`.');\n\n    mysqlDs.autoupdate('Order', function (err) {\n      if (err) throw err;\n      console.log('\\nAutoupdated table `Order`.');\n      // at this point the database table `Order` should have one foreign key `customerId` integrated\n    });\n  });\n};\n```\n\n</details>\n\n#### Breaking Changes with GeoPoint since 5.x\n\nPrior to `loopback-connector-mysql@5.x`, MySQL connector was saving and loading\nGeoPoint properties from the MySQL database in reverse. MySQL expects values to\nbe `POINT(X, Y)` or `POINT(lng, lat)`, but the connector was saving them in the\nopposite order(i.e. `POINT(lat,lng)`).\n\nUse the `geopoint` type to achieve so:\n\n```ts\n  @property({\n    type: 'geopoint'\n  })\n  name: GeoPoint;\n```\n\nIf you have an application with a model that has a GeoPoint property using\nprevious versions of this connector, you can migrate your models using the\nfollowing programmatic approach:\n\n<details><summary markdown=\"span\"><strong>Click here to expand</strong></summary>\n\n**NOTE** Please back up the database tables that have your application data\nbefore performing any of the steps.\n\n1. Create a boot script under `server/boot/` directory with the following:\n\n```js\n'use strict';\nmodule.exports = function (app) {\n  function findAndUpdate() {\n    var teashop = app.models.teashop;\n    //find all instances of the model we'd like to migrate\n    teashop.find({}, function (err, teashops) {\n      teashops.forEach(function (teashopInstance) {\n        //what we fetch back from the db is wrong, so need to revert it here\n        var newLocation = {\n          lng: teashopInstance.location.lat,\n          lat: teashopInstance.location.lng,\n        };\n        //only update the GeoPoint property for the model\n        teashopInstance.updateAttribute('location', newLocation, function (\n          err,\n          inst,\n        ) {\n          if (err) console.log('update attribute failed', err);\n          else console.log('updateAttribute successful');\n        });\n      });\n    });\n  }\n\n  findAndUpdate();\n};\n```\n\n2. Run the boot script by simply running your application or `node .`\n\nFor the above example, the model definition is as follows:\n\n```json\n{\n  \"name\": \"teashop\",\n  \"base\": \"PersistedModel\",\n  \"idInjection\": true,\n  \"options\": {\n    \"validateUpsert\": true\n  },\n  \"properties\": {\n    \"name\": {\n      \"type\": \"string\",\n      \"default\": \"storename\"\n    },\n    \"location\": {\n      \"type\": \"geopoint\"\n    }\n  },\n  \"validations\": [],\n  \"relations\": {},\n  \"acls\": [],\n  \"methods\": {}\n}\n```\n\n</details>\n\n## Running tests\n\n### Own instance\n\nIf you have a local or remote MySQL instance and would like to use that to run\nthe test suite, use the following command:\n\n- Linux\n\n```bash\nMYSQL_HOST=<HOST> MYSQL_PORT=<PORT> MYSQL_USER=<USER> MYSQL_PASSWORD=<PASSWORD> MYSQL_DATABASE=<DATABASE> CI=true npm test\n```\n\n- Windows\n\n```bash\nSET MYSQL_HOST=<HOST> SET MYSQL_PORT=<PORT> SET MYSQL_USER=<USER> SET MYSQL_PASSWORD=<PASSWORD> SET MYSQL_DATABASE=<DATABASE> SET CI=true npm test\n```\n\n### Docker\n\nIf you do not have a local MySQL instance, you can also run the test suite with\nvery minimal requirements.\n\n- Assuming you have [Docker](https://docs.docker.com/engine/installation/)\n  installed, run the following script which would spawn a MySQL instance on your\n  local:\n\n```bash\nsource setup.sh <HOST> <PORT> <USER> <PASSWORD> <DATABASE>\n```\n\nwhere `<HOST>`, `<PORT>`, `<USER>`, `<PASSWORD>` and `<DATABASE>` are optional\nparameters. The default values are `localhost`, `3306`, `root`, `pass` and\n`testdb` respectively.\n\n- Run the test:\n\n```bash\nnpm test\n```\n","readmeFilename":"README.md"}