Skip to content

Instantly share code, notes, and snippets.

@gl2748
Created June 6, 2018 00:25
Show Gist options
  • Save gl2748/2f05e2f3c694d9eb59bc265534e5c3a3 to your computer and use it in GitHub Desktop.
Save gl2748/2f05e2f3c694d9eb59bc265534e5c3a3 to your computer and use it in GitHub Desktop.
mysql_wworks
            case 'fingerprint':
            debugger
                /* Does not work
                andList.push(
                  sequelize.query("SELECT * FROM `users` WHERE JSON_EXTRACT(fingerprint, '$.ref') = 'https://jsfiddle.net/' " , { type: sequelize.QueryTypes.SELECT})
                )
                */
               //User.findAll({
                //where: {
                  //$and: [
                    fingerprint: {
                      sequelize.where(
                        sequelize.literal('fingerprint->"$.ref"'),
                        "https://jsfiddle.net/"
                      )
                    }
                  //]
               // }
              //});
            break;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment