def Args(parser): """See base class.""" resource_args.AddDatabaseResourceArg(parser, 'to create') flags.Ddl( help_text='Semi-colon separated DDL (data definition language) ' 'statements to run inside the ' 'newly created database. If there is an error in any statement, ' 'the database is not created. This option is not supported for ' 'the PostgreSQL dialect. Full DDL specification is at ' 'https://cloud.google.com/spanner/docs/data-definition-language' ).AddToParser(parser) flags.DdlFile( help_text= 'Path of a file that contains semi-colon separated DDL (data ' 'definition language) statements to run inside the newly created ' 'database. If there is an error in any statement, the database is not ' 'created. This option is not supported for the PostgreSQL dialect. ' 'Full DDL specification is at ' 'https://cloud.google.com/spanner/docs/data-definition-language.' ' If --ddl_file is set, --ddl is ignored.').AddToParser(parser) base.ASYNC_FLAG.AddToParser(parser) parser.display_info.AddCacheUpdater(flags.DatabaseCompleter) resource_args.AddKmsKeyResourceArg( parser, 'to create the Cloud Spanner database') flags.DatabaseDialect( help_text='The SQL dialect of the Cloud Spanner Database. ' 'GOOGLE_STANDARD_SQL is the default.').AddToParser(parser)
def Args(parser): """See base class.""" resource_args.AddDatabaseResourceArg(parser, 'of which the ddl to update') flags.Ddl(required=True, help_text='Semi-colon separated DDL ' '(data definition language) statements to ' 'run inside the database. If a statement fails, all subsequent ' 'statements in the batch are automatically cancelled.' ).AddToParser(parser) base.ASYNC_FLAG.AddToParser(parser)
def Args(parser): """See base class.""" resource_args.AddDatabaseResourceArg(parser, 'to create') flags.Ddl(help_text='Semi-colon separated DDL (data definition language) ' 'statements to run inside the ' 'newly created database. If there is an error in any statement, ' 'the database is not created. Full DDL specification is at ' 'https://cloud.google.com/spanner/docs/data-definition-language' ).AddToParser(parser) base.ASYNC_FLAG.AddToParser(parser) parser.display_info.AddCacheUpdater(flags.DatabaseCompleter)
def Args(parser): """See base class.""" resource_args.AddDatabaseResourceArg(parser, 'of which the ddl to update') flags.Ddl( help_text='Semi-colon separated DDL ' '(data definition language) statements to ' 'run inside the database. If a statement fails, all subsequent ' 'statements in the batch are automatically cancelled.' ).AddToParser(parser) flags.DdlFile( help_text='Path of a file containing semi-colon separated DDL (data ' 'definition language) statements to run inside the database. If a ' 'statement fails, all subsequent statements in the batch are ' 'automatically cancelled. If --ddl_file is set, --ddl is ignored.' ).AddToParser(parser) base.ASYNC_FLAG.AddToParser(parser)
def Args(parser): """Args is called by calliope to gather arguments for this command. Please add arguments in alphabetical order except for no- or a clear- pair for that argument which can follow the argument itself. 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. """ flags.Instance(positional=False).AddToParser(parser) flags.Database().AddToParser(parser) flags.Ddl(required=True, help_text='Semi-colon separated DDL ' '(data definition language) statements to ' 'run inside the database. If a statement fails, all subsequent ' 'statements in the batch are automatically cancelled.' ).AddToParser(parser) base.ASYNC_FLAG.AddToParser(parser)
def Args(parser): """Args is called by calliope to gather arguments for this command. Please add arguments in alphabetical order except for no- or a clear- pair for that argument which can follow the argument itself. 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. """ flags.Instance(positional=False).AddToParser(parser) flags.Database().AddToParser(parser) flags.Ddl(help_text='Semi-colon separated DDL (data definition language) ' 'statements to run inside the ' 'newly created database. If there is an error in any statement, ' 'the database is not created. Full DDL specification is at ' 'https://cloud.google.com/spanner/docs/data-definition-language' ).AddToParser(parser) base.ASYNC_FLAG.AddToParser(parser)