コード例 #1
0
ファイル: args.py プロジェクト: mschoenlaub/dbnavigator
# 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 dbnav.args import parent_parser, format_group, create_parser
from dbnav.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='dbstat',
    description='A database status tool',
    parents=[parent])
parser.add_argument(
    'uri',
    help='the URI to a DBMS')
コード例 #2
0
ファイル: args.py プロジェクト: mschoenlaub/dbnavigator
# 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 dbnav.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)
コード例 #3
0
ファイル: args.py プロジェクト: mschoenlaub/dbnavigator
# 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 dbnav.args import parent_parser, format_group, create_parser
from dbnav.args import CommaSeparatedDict

from .writer import SqlInsertWriter, SqlUpdateWriter, SqlDeleteWriter
from .writer import YamlWriter, FormattedWriter

parent = parent_parser(daemonable=True)

group = format_group(
    parent,
    SqlInsertWriter)
group.add_argument(
    '-I',
    '--insert',
    default=True,
    help='output format: SQL insert statements',
    dest='formatter',
    action='store_const',
    const=SqlInsertWriter)
group.add_argument(
    '-U',
    '--update',
    help='output format: SQL update statements',
    dest='formatter',
    action='store_const',
コード例 #4
0
ファイル: args.py プロジェクト: mschoenlaub/dbnavigator
# 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 dbnav.args import parent_parser, format_group, create_parser
from dbnav.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(
コード例 #5
0
ファイル: args.py プロジェクト: mschoenlaub/dbnavigator
# 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 dbnav.args import parent_parser, format_group, create_parser

from .writer import DiffWriter, DiffColumnWriter, DiffTestWriter

parent = parent_parser(daemonable=True)

group = format_group(parent, DiffTestWriter)
group.add_argument(
    '-D',
    '--default',
    default=True,
    help='output format: human readable hierarchical text',
    dest='formatter',
    action='store_const',
    const=DiffWriter)
group.add_argument(
    '-S',
    '--side-by-side',
    help='output format: compare side-by-side in two columns',
    dest='formatter',
    action='store_const',
    const=DiffColumnWriter)
コード例 #6
0
ファイル: args.py プロジェクト: mschoenlaub/dbnavigator
# 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 dbnav.args import parent_parser, format_group, create_parser

from .writer import GraphWriter, GraphvizWriter, GraphTestWriter

parent = parent_parser(daemonable=True)

group = format_group(
    parent,
    GraphTestWriter)
group.add_argument(
    '-D',
    '--default',
    default=True,
    help='output format: human readable hierarchical text',
    dest='formatter',
    action='store_const',
    const=GraphWriter)
group.add_argument(
    '-G',
    '--graphviz',
    help='output format: a Graphviz graph',
    dest='formatter',
    action='store_const',