createSheet creates a sheet with base64-encoded SQL content.
(ctx context.Context, project, sql string)
| 310 | |
| 311 | // createSheet creates a sheet with base64-encoded SQL content. |
| 312 | func (s *Server) createSheet(ctx context.Context, project, sql string) (string, error) { |
| 313 | return s.callAPI(ctx, "/bytebase.v1.SheetService/CreateSheet", "create sheets", "bb.sheets.create", map[string]any{ |
| 314 | "parent": project, |
| 315 | "sheet": map[string]any{ |
| 316 | "content": base64.StdEncoding.EncodeToString([]byte(sql)), |
| 317 | }, |
| 318 | }) |
| 319 | } |
| 320 | |
| 321 | // createPlan creates a plan with a single changeDatabaseConfig spec. |
| 322 | func (s *Server) createPlan(ctx context.Context, project, title, target, sheet string) (string, error) { |