Creates an interactive SQL shell connection to the profile context environment. The SQL shell command is running `psql` behind the scenes.
(cx: &RegionContext, RunArgs { cluster, psql_args }: RunArgs)
| 33 | /// Creates an interactive SQL shell connection to the profile context environment. |
| 34 | /// The SQL shell command is running `psql` behind the scenes. |
| 35 | pub async fn run(cx: &RegionContext, RunArgs { cluster, psql_args }: RunArgs) -> Result<(), Error> { |
| 36 | let sql_client = cx.sql_client(); |
| 37 | let claims = cx.admin_client().claims().await?; |
| 38 | let region_info = cx.get_region_info().await?; |
| 39 | let user = claims.user()?; |
| 40 | |
| 41 | let _error = sql_client |
| 42 | .shell(®ion_info, user, cluster) |
| 43 | .args(psql_args) |
| 44 | .exec(); |
| 45 | |
| 46 | Ok(()) |
| 47 | } |
nothing calls this directly
no test coverage detected