%PDF- %PDF-
| Direktori : /proc/thread-self/root/proc/self/root/usr/lib/python2.7/site-packages/salt/states/ |
| Current File : //proc/thread-self/root/proc/self/root/usr/lib/python2.7/site-packages/salt/states/mysql_query.pyc |
�
���^c @@ s� d Z d d l m Z m Z m Z d d l Z d d l Z d d l Z d d l
Z d d l m Z d � Z
d � Z d d d d e d e d � Z d d d e e d � Z d S( u�
Execution of MySQL queries
==========================
.. versionadded:: 2014.7.0
:depends: - MySQLdb Python module
:configuration: See :py:mod:`salt.modules.mysql` for setup instructions.
The mysql_query module is used to execute queries on MySQL databases.
Its output may be stored in a file or in a grain.
.. code-block:: yaml
query_id:
mysql_query.run
- database: my_database
- query: "SELECT * FROM table;"
- output: "/tmp/query_id.txt"
i ( t absolute_importt print_functiont unicode_literalsN( t sixc C@ s
d t k S( u@
Only load if the mysql module is available in __salt__
u mysql.query( t __salt__( ( ( s; /usr/lib/python2.7/site-packages/salt/states/mysql_query.pyt __virtual__$ s c C@ s! t j t d j j j d d � S( up
Look in module context for a MySQL error. Eventually we should make a less
ugly way of doing this.
u test.pingu mysql.errorN( t syst modulesR t
__module__t __context__t popt None( ( ( s; /usr/lib/python2.7/site-packages/salt/states/mysql_query.pyt _get_mysql_error+ s c K@ s6 i | d 6i d 6t d 6d j | � d 6}
t g d d d d d
g D] } | j | � ^ qD � r� t d | d | px t �} n t j j | � s� d
j | � |
d <t |
d <|
S| rt d | | � rt
� } | d'