(
ctx: &dyn CliSessionContext,
files: Vec<String>,
print_options: &PrintOptions,
)
| 108 | } |
| 109 | |
| 110 | pub async fn exec_from_files( |
| 111 | ctx: &dyn CliSessionContext, |
| 112 | files: Vec<String>, |
| 113 | print_options: &PrintOptions, |
| 114 | ) -> Result<()> { |
| 115 | let files = files |
| 116 | .into_iter() |
| 117 | .map(|file_path| File::open(file_path).unwrap()) |
| 118 | .collect::<Vec<_>>(); |
| 119 | |
| 120 | for file in files { |
| 121 | let mut reader = BufReader::new(file); |
| 122 | exec_from_lines(ctx, &mut reader, print_options).await?; |
| 123 | } |
| 124 | |
| 125 | Ok(()) |
| 126 | } |
| 127 | |
| 128 | /// run and execute SQL statements and commands against a context with the given print options |
| 129 | pub async fn exec_from_repl( |
no test coverage detected
searching dependent graphs…