예제 #1
0
파일: args.py 프로젝트: gschaden/dbmanagr
# 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)

parser = create_parser(
    prog='dbexec',
예제 #2
0
파일: args.py 프로젝트: resamsel/dbmanagr
# 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',
    dest='formatter',
    action='store_const',
    const=ArgumentVerboseWriter)
예제 #3
0
# 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',
                   '--json',
                   help='output format: JSON',
예제 #4
0
파일: args.py 프로젝트: gschaden/dbmanagr
# 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 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',
                   const=SqlUpdateWriter)
group.add_argument('-D',
                   '--delete',
예제 #5
0
파일: args.py 프로젝트: resamsel/dbmanagr
# 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(
예제 #6
0
파일: args.py 프로젝트: resamsel/dbmanagr
# 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])
parser.add_argument(
    'uri',
예제 #7
0
파일: args.py 프로젝트: gschaden/dbmanagr
# 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 .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)

parser = create_parser(
예제 #8
0
파일: args.py 프로젝트: resamsel/dbmanagr
# 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 .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)
예제 #9
0
# 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',
                   dest='formatter',
                   action='store_const',
                   const=ArgumentVerboseWriter)

parser = create_parser(
    prog='dbargs',
예제 #10
0
파일: args.py 프로젝트: resamsel/dbmanagr
# 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 .writer import GraphWriter, GraphvizWriter, GraphTestWriter, YamlWriter

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',
예제 #11
0
파일: args.py 프로젝트: resamsel/dbmanagr
# 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)
예제 #12
0
파일: args.py 프로젝트: gschaden/dbmanagr
# 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 .writer import GraphWriter, GraphvizWriter, GraphTestWriter, YamlWriter

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',
                   const=GraphvizWriter)
group.add_argument('-Y',
                   '--yaml',
예제 #13
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/>.
#

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])
parser.add_argument('uri', help='the URI to a DBMS')
parser.add_argument(
    'pattern',
예제 #14
0
파일: args.py 프로젝트: resamsel/dbmanagr
# 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 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',