Git Product home page Git Product logo

Comments (2)

davidalger avatar davidalger commented on May 26, 2024

I'm not sure exactly when this was addressed TBH, but it was at some point as it is possible with Warden 0.5.3 to pass arguments to db sub-commands:

$ warden db connect -e 'show databases;'
+--------------------+
| Database           |
+--------------------+
| information_schema |
| magento            |
+--------------------+

from warden.

davidalger avatar davidalger commented on May 26, 2024

Actually my bad, this hadn't been implemented, just partially so (you could pass args to db connect, but you could not pass them to db import and you certainly could not override the db name). It has been addressed in a556fd7. All of the following scenarios function:

davidalger:03:50 PM:~/sites/sh6$ echo "SELECT @@FOREIGN_KEY_CHECKS;" | warden db import -A
@@FOREIGN_KEY_CHECKS
1
davidalger:03:51 PM:~/sites/sh6$ echo "SELECT @@FOREIGN_KEY_CHECKS;" | warden db import -A --init-command="SET SESSION FOREIGN_KEY_CHECKS=0;"
@@FOREIGN_KEY_CHECKS
0
davidalger:03:51 PM:~/sites/sh6$ warden db connect -A -e 'show databases'
+--------------------+
| Database           |
+--------------------+
| information_schema |
| shopware           |
| shopware_e2e       |
| shopware_test      |
+--------------------+
davidalger:03:51 PM:~/sites/sh6$ warden db connect -A shopware_test
Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 20
Server version: 10.4.13-MariaDB-1:10.4.13+maria~focal mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [shopware_test]> Bye
davidalger:03:51 PM:~/sites/sh6$ warden db connect
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 34
Server version: 10.4.13-MariaDB-1:10.4.13+maria~focal mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [shopware]> Bye
davidalger:03:51 PM:~/sites/sh6$ warden db connect shopware_e2e
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Welcome to the MariaDB monitor.  Commands end with ; or \g.
Your MariaDB connection id is 36
Server version: 10.4.13-MariaDB-1:10.4.13+maria~focal mariadb.org binary distribution

Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

MariaDB [shopware_e2e]> Bye

from warden.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.