GetSQLResultSize gets the valid data_export_result_size from the workspace profile setting.
(ctx context.Context, workspaceID string)
| 48 | |
| 49 | // GetSQLResultSize gets the valid data_export_result_size from the workspace profile setting. |
| 50 | func (s *Store) GetSQLResultSize(ctx context.Context, workspaceID string) (int64, error) { |
| 51 | workspaceProfile, err := s.GetWorkspaceProfileSetting(ctx, workspaceID) |
| 52 | if err != nil { |
| 53 | return 0, err |
| 54 | } |
| 55 | maximumResultSize := workspaceProfile.GetSqlResultSize() |
| 56 | if maximumResultSize <= 0 { |
| 57 | maximumResultSize = common.DefaultMaximumSQLResultSize |
| 58 | } |
| 59 | return maximumResultSize, nil |
| 60 | } |
| 61 | |
| 62 | // GetQueryTimeoutInSeconds gets the valid query_timeout from the workspace profile setting. |
| 63 | func (s *Store) GetQueryTimeoutInSeconds(ctx context.Context, workspaceID string) (int64, error) { |
no test coverage detected