
    3                     "   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        [        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$GetSpannerCliDirectedReadCommandFlag+GetSpannerCliProtoDescriptorFileCommandFlag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,,.::6B335AA&I    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.ArgsG   s     r$   c                    [         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R@                  _SURB                  _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directed_readproto_descriptor_fileenv )"r   GetFromNamespaceCONCEPTSr/   ParseParentNamer   VALUESapi_endpoint_overridesPropertyGetr   SpannerCliWrapperGetEnvArgsForCommandr1   r2   r3   r5   r6   r7   r8   r9   r:   r;   r<   r=   r>   r?   r@   rA   rB   rC   rD   )selfargsr.   r0   api_endpoint_overridecommand_executorenv_varss          r"   RunCli.RunL   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'( &&)* ..+, ((-. #88/0 14 	r$   rF   N)__name__
__module____qualname____firstlineno____doc__DETAILED_HELPdetailed_helpstaticmethodr)   rW   __static_attributes__rF   r$   r"   r&   r&   @   s#     *- $	r$   r&   N)r]   googlecloudsdk.callioper   "googlecloudsdk.command_lib.spannerr   r   r   $googlecloudsdk.command_lib.util.apisr   googlecloudsdk.corer   r^   r#   UniverseCompatibleReleaseTracksReleaseTrackALPHAGABinaryBackedCommandr&   rF   r$   r"   <module>rl      s    0 ( : 4 < : *  J< D%%++T->->-A-AB.	$
"
" .	 C .	r$   