def Args(parser): """Args is called by calliope to gather arguments for this command. Args: parser: An argparse parser that you can use to add arguments that go on the command line after this command. Positional arguments are allowed. """ import_util.AddBaseImportFlags(parser) flags.AddDatabase( parser, 'The database (for example, guestbook) to which the import is made.', required=True) parser.add_argument('--table', required=True, help='The database table to import csv file into.') parser.add_argument( '--columns', required=False, type=arg_parsers.ArgList(min_length=1), metavar='COLUMNS', help= 'The columns to import from csv file. These correspond to actual ' 'database columns to import. If not set, all columns from csv file ' 'are imported to corresponding database columns.')
def Args(parser): """Args is called by calliope to gather arguments for this command.""" AddBaseArgs(parser) sql_flags.AddDatabase(parser, 'The PostgreSQL database to connect to.') parser.add_argument( '--port', type=arg_parsers.BoundedInt(lower_bound=1, upper_bound=65535), default=constants.DEFAULT_PROXY_PORT_NUMBER, help=('Port number that gcloud will use to connect to the Cloud SQL ' 'Proxy through localhost.'))
def Args(parser): """Args is called by calliope to gather arguments for this command. Args: parser: An argparse parser that you can use to add arguments that go on the command line after this command. Positional arguments are allowed. """ import_util.AddBaseImportFlags(parser, filetype='MySQL dump') flags.AddDatabase(parser, flags.DEFAULT_DATABASE_IMPORT_HELP_TEXT)
def Args(parser): """Args is called by calliope to gather arguments for this command. Args: parser: An argparse parser that you can use to add arguments that go on the command line after this command. Positional arguments are allowed. """ import_util.AddBaseImportFlags( parser, filetype='BAK file', gz_supported=False, user_supported=False) flags.AddDatabase( parser, flags.SQLSERVER_DATABASE_IMPORT_HELP_TEXT, required=True) flags.AddEncryptedBakFlags(parser)
def Args(parser): """Args is called by calliope to gather arguments for this command. Args: parser: An argparse parser that you can use to add arguments that go on the command line after this command. Positional arguments are allowed. """ import_util.AddBaseImportFlags(parser, filetype='MySQL dump') flags.AddDatabase( parser, 'Database (for example, guestbook) to which the import is' ' made. If not set, it is assumed that the database is specified in' ' the file to be imported.')
def AddBaseExportFlags(parser): base.ASYNC_FLAG.AddToParser(parser) flags.AddInstanceArgument(parser) flags.AddUriArgument( parser, 'The path to the file in Google Cloud Storage where the export ' 'will be stored. The URI is in the form gs://bucketName/fileName. ' 'If the file already exists, the operation fails. If the filename ' 'ends with .gz, the contents are compressed.') flags.AddDatabase( parser, 'Database (for example, guestbook) from which the export is ' 'made. If unspecified, all databases are exported.')
def Args(parser): """Args is called by calliope to gather arguments for this command. Args: parser: An argparse parser that you can use to add arguments that go on the command line after this command. Positional arguments are allowed. """ import_util.AddBaseImportFlags(parser, filetype='MySQL dump') flags.AddDatabase( parser, 'Database to which the import is made. If not set, it is assumed that ' 'the database is specified in the file to be imported. If your SQL ' 'dump file includes a database statement, it will override the ' 'database set in this flag.')
def Args(parser): """Args is called by calliope to gather arguments for this command. Args: parser: An argparse parser that you can use to add arguments that go on the command line after this command. Positional arguments are allowed. """ parser.add_argument('instance', completer=flags.InstanceCompleter, help='Cloud SQL instance ID.') parser.add_argument( 'uri', type=str, help='Path to the MySQL dump file in Google Cloud Storage from which' ' the import is made. The URI is in the form gs://bucketName/fileName.' ' Compressed gzip files (.gz) are also supported.') base.ASYNC_FLAG.AddToParser(parser) flags.AddDatabase(parser, flags.DEFAULT_DATABASE_IMPORT_HELP_TEXT)
def Args(parser): """Args is called by calliope to gather arguments for this command.""" AddBaseArgs(parser) AddBetaArgs(parser) sql_flags.AddDatabase( parser, 'The PostgreSQL or SQL Server database to connect to.')