
    C                     "   S r SSKJr  SSKJr  SSKJr  SSKJr  SSKJr  SSK	J
r
  SS	0rS
 r\R                  \R                  " \R                  R                   \R                  R"                  5       " S S\R$                  5      5       5       rg)z)Start the Spanner command-line interface.    )base)cli_backend)flags)resource_args)	arg_utils)
propertiesEXAMPLESz      To start an interactive shell with your Spanner example database, run the following command:

        $ {command} example-database --instance=example-instance
    c                    [         R                  " U S5        [        R                  " 5       R	                  U 5        [        R
                  " 5       R	                  U 5        [        R                  " 5       R	                  U 5        [        R                  " 5       R	                  U 5        [        R                  " 5       R	                  U 5        [        R                  " 5       R	                  U 5        [        R                  " 5       R	                  U 5        [        R                  " 5       R	                  U 5        [        R                  " 5       R	                  U 5        [        R                  " 5       R	                  U 5        [        R                  " 5       R	                  U 5        [        R                  " 5       R	                  U 5        [        R                   " 5       R	                  U 5        [        R"                  " 5       R	                  U 5        [        R$                  " 5       R	                  U 5        [        R&                  " 5       R	                  U 5        [        R(                  " 5       R	                  U 5        g)z_Parses provided arguments to add base arguments.

Args:
  parser: an argparse argument parser.
z#to use within the interactive shellN)r   AddDatabaseResourceArgr   GetSpannerCliDatabaseRoleFlagAddToParserGetSpannerCliDelimiterFlagGetSpannerCliExecuteFlagGetSpannerCliHostFlagGetSpannerCliHtmlFlag'GetSpannerCliIdleTransactionTimeoutFlagGetSpannerCliInitCommandAddFlagGetSpannerCliInitCommandFlagGetSpannerCliPortFlagGetSpannerCliPromptFlag GetSpannerCliSkipColumnNamesFlag"GetSpannerCliSkipSystemCommandFlagGetSpannerCliSystemCommandFlagGetSpannerCliSourceFlagGetSpannerCliTableFlagGetSpannerCliTeeFlagGetSpannerCliXmlFlagparsers    lib/surface/spanner/cli.pyAddBaseArgsr!   "   s    &&3 %%'33F;""$008  "..v6++F3++F3//1==fE'')55f=$$&226:++F3!--f5((*66v>**,88@&&(44V<!--f5 ,,V4**62**62    c                   2    \ rS rSrSr\r\S 5       rS r	Sr
g)Cli>   z!An interactive shell for Spanner.c                     [        U 5        g)zSee base class.N)r!   r   s    r    ArgsCli.ArgsE   s     r"   c                 j   [         R                  " USSS9nUR                  R                  R	                  5       R                  5       R                  5       n[        R                  R                  R                  S5      R                  5       n[        R                  " 5       n[        R                  " 5       nU" S0 SU_SUR                  _SU_SUR                  _S	UR                   _S
UR"                  _SU_SUR$                  _SUR&                  _SUR(                  _SUR*                  _SUR,                  _SUR.                  _SUR0                  _SUR2                  _SUR4                  _SUR6                  _SUR8                  _SUR:                  _SUR<                  _SUR>                  _SU_6  g )Nz	--projectT)use_defaultsspannerprojectdatabaseinstancedatabase_rolehostportapi_endpointidle_transaction_timeoutskip_column_namesskip_system_commandsystem_commandprompt	delimitertablehtmlxmlexecutesourceteeinit_commandinit_command_addenv ) r   GetFromNamespaceCONCEPTSr-   ParseParentNamer   VALUESapi_endpoint_overridesPropertyGetr   SpannerCliWrapperGetEnvArgsForCommandr/   r0   r1   r3   r4   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   )selfargsr,   r.   api_endpoint_overridecommand_executorenv_varss          r    RunCli.RunJ   s   (({NG}}%%++-446;;=H&--DDMM	ce 
 #446//1H   ((	
 YY YY + "&!>!> 00 !44 ** {{ .. jj YY  HH!" #$ {{%& HH'( &&)* ..+, -0 	r"   rB   N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr'   rS   __static_attributes__rB   r"   r    r$   r$   >   s#     *- "	r"   r$   N)rY   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   r   r   $googlecloudsdk.command_lib.util.apisr   googlecloudsdk.corer   rZ   r!   DefaultUniverseOnlyReleaseTracksReleaseTrackALPHAGABinaryBackedCommandr$   rB   r"   r    <module>rh      s    0 ( : 4 < : *  38 D%%++T->->-A-AB,	$
"
" ,	 C ,	r"   