Пример #1
0
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Database Navigator.  If not, see <http://www.gnu.org/licenses/>.
#

import argparse
import sys

from dbmanagr.args import parent_parser, format_group, create_parser

from .writer import ExecuteWriter, SqlInsertWriter, ExecuteTestWriter

parent = parent_parser()

group = format_group(parent, ExecuteTestWriter)
group.add_argument('-D',
                   '--default',
                   help='output format: tuples',
                   dest='formatter',
                   action='store_const',
                   const=ExecuteWriter)
group.add_argument('-I',
                   '--insert',
                   help='output format: SQL insert statements',
                   dest='formatter',
                   action='store_const',
                   const=SqlInsertWriter)
Пример #2
0
# Database Navigator is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Database Navigator.  If not, see <http://www.gnu.org/licenses/>.
#

import argparse

from dbmanagr.args import parent_parser, format_group, create_parser

from .writer import ArgumentWriter, ArgumentTestWriter, ArgumentVerboseWriter

parent = parent_parser(daemonable=True)

group = format_group(
    parent,
    ArgumentTestWriter)
group.add_argument(
    '-D',
    '--default',
    default=True,
    help='output format: human readable hierarchical text',
    dest='formatter',
    action='store_const',
    const=ArgumentWriter)
group.add_argument(
    '-V',
    help='output format: better readable text',
Пример #3
0
# Database Navigator is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Database Navigator.  If not, see <http://www.gnu.org/licenses/>.
#

from dbmanagr.args import parent_parser, format_group, create_parser
from dbmanagr.writer import TestWriter

from .writer import SimplifiedWriter, SimpleWriter, JsonWriter
from .writer import AutocompleteWriter

parent = parent_parser(daemonable=True)

group = format_group(parent, TestWriter)
group.add_argument('-D',
                   '--default',
                   help='output format: default',
                   dest='formatter',
                   action='store_const',
                   const=SimplifiedWriter)
group.add_argument('-S',
                   '--simple',
                   help='output format: simple',
                   dest='formatter',
                   action='store_const',
                   const=SimpleWriter)
group.add_argument('-J',
Пример #4
0
#
# Database Navigator is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with Database Navigator.  If not, see <http://www.gnu.org/licenses/>.
#

from dbmanagr.args import parent_parser, format_group, create_parser
from dbmanagr.args import CommaSeparatedPlainList, CommaSeparatedStringList

from .writer import StatementActivityWriter

parent = parent_parser()

group = format_group(parent)
group.add_argument(
    '-D',
    '--default',
    help='output format: default',
    dest='formatter',
    action='store_const',
    const=StatementActivityWriter)

parser = create_parser(
    prog='dbstac',
    description='Lists the statements and transactions currently active in '
                'the DBMS.',
    parents=[parent])