MCPcopy Index your code
hub / github.com/bytebase/bytebase / GetSQLResultSize

Method GetSQLResultSize

backend/store/setting.go:50–60  ·  view source on GitHub ↗

GetSQLResultSize gets the valid data_export_result_size from the workspace profile setting.

(ctx context.Context, workspaceID string)

Source from the content-addressed store, hash-verified

48
49// GetSQLResultSize gets the valid data_export_result_size from the workspace profile setting.
50func (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.
63func (s *Store) GetQueryTimeoutInSeconds(ctx context.Context, workspaceID string) (int64, error) {

Callers 2

getSQLResultSizeLimitMethod · 0.80

Calls 2

GetSqlResultSizeMethod · 0.45

Tested by

no test coverage detected