Documentation
¶
Index ¶
- Constants
- Variables
- func EscapeDoubleQuotes(column string) string
- func EscapeSingleQuotes(value string) string
- type ColumnInfo
- type Server
- func (s *Server) CreateInstance(ctx context.Context, req *api.CreateInstanceRequest) (*api.CreateInstanceResponse, error)
- func (s *Server) CreateRepo(ctx context.Context, req *api.CreateRepoRequest) (*api.CreateRepoResponse, error)
- func (s *Server) DeleteFile(ctx context.Context, req *api.DeleteFileRequest) (*api.DeleteFileResponse, error)
- func (s *Server) DeleteFileAndMigrate(ctx context.Context, req *api.DeleteFileAndMigrateRequest) (*api.DeleteFileAndMigrateResponse, error)
- func (s *Server) DeleteInstance(ctx context.Context, req *api.DeleteInstanceRequest) (*api.DeleteInstanceResponse, error)
- func (s *Server) DeleteRepo(ctx context.Context, req *api.DeleteRepoRequest) (*api.DeleteRepoResponse, error)
- func (s *Server) EstimateRollupInterval(ctx context.Context, req *api.EstimateRollupIntervalRequest) (*api.EstimateRollupIntervalResponse, error)
- func (s *Server) EstimateSmallestTimeGrain(ctx context.Context, request *api.EstimateSmallestTimeGrainRequest) (*api.EstimateSmallestTimeGrainResponse, error)
- func (s *Server) GenerateTimeSeries(ctx context.Context, request *api.GenerateTimeSeriesRequest) (*api.TimeSeriesRollup, error)
- func (s *Server) GetCardinalityOfColumn(ctx context.Context, request *api.CardinalityOfColumnRequest) (*api.CategoricalSummary, error)
- func (s *Server) GetCatalogObject(ctx context.Context, req *api.GetCatalogObjectRequest) (*api.GetCatalogObjectResponse, error)
- func (s *Server) GetDescriptiveStatistics(ctx context.Context, request *api.DescriptiveStatisticsRequest) (*api.NumericSummary, error)
- func (s *Server) GetFile(ctx context.Context, req *api.GetFileRequest) (*api.GetFileResponse, error)
- func (s *Server) GetInstance(ctx context.Context, req *api.GetInstanceRequest) (*api.GetInstanceResponse, error)
- func (s *Server) GetNullCount(ctx context.Context, nullCountRequest *api.NullCountRequest) (*api.NullCountResponse, error)
- func (s *Server) GetNumericHistogram(ctx context.Context, request *api.NumericHistogramRequest) (*api.NumericSummary, error)
- func (s *Server) GetRepo(ctx context.Context, req *api.GetRepoRequest) (*api.GetRepoResponse, error)
- func (s *Server) GetRugHistogram(ctx context.Context, request *api.RugHistogramRequest) (*api.NumericSummary, error)
- func (s *Server) GetTimeRangeSummary(ctx context.Context, request *api.TimeRangeSummaryRequest) (*api.TimeRangeSummary, error)
- func (s *Server) GetTopK(ctx context.Context, topKRequest *api.TopKRequest) (*api.CategoricalSummary, error)
- func (s *Server) HTTPHandler(ctx context.Context) (http.Handler, error)
- func (s *Server) ListCatalogObjects(ctx context.Context, req *api.ListCatalogObjectsRequest) (*api.ListCatalogObjectsResponse, error)
- func (s *Server) ListConnectors(ctx context.Context, req *api.ListConnectorsRequest) (*api.ListConnectorsResponse, error)
- func (s *Server) ListFiles(ctx context.Context, req *api.ListFilesRequest) (*api.ListFilesResponse, error)
- func (s *Server) ListInstances(ctx context.Context, req *api.ListInstancesRequest) (*api.ListInstancesResponse, error)
- func (s *Server) ListRepos(ctx context.Context, req *api.ListReposRequest) (*api.ListReposResponse, error)
- func (s *Server) MetricsViewMeta(ctx context.Context, req *api.MetricsViewMetaRequest) (*api.MetricsViewMetaResponse, error)
- func (s *Server) MetricsViewTimeSeries(ctx context.Context, req *api.MetricsViewTimeSeriesRequest) (*api.MetricsViewTimeSeriesResponse, error)
- func (s *Server) MetricsViewToplist(ctx context.Context, req *api.MetricsViewToplistRequest) (*api.MetricsViewToplistResponse, error)
- func (s *Server) MetricsViewTotals(ctx context.Context, req *api.MetricsViewTotalsRequest) (*api.MetricsViewTotalsResponse, error)
- func (s *Server) Migrate(ctx context.Context, req *api.MigrateRequest) (*api.MigrateResponse, error)
- func (s *Server) MigrateDelete(ctx context.Context, req *api.MigrateDeleteRequest) (*api.MigrateDeleteResponse, error)
- func (s *Server) MigrateSingle(ctx context.Context, req *api.MigrateSingleRequest) (*api.MigrateSingleResponse, error)
- func (s *Server) Ping(ctx context.Context, req *api.PingRequest) (*api.PingResponse, error)
- func (s *Server) ProfileColumns(ctx context.Context, req *api.ProfileColumnsRequest) (*api.ProfileColumnsResponse, error)
- func (s *Server) PutFile(ctx context.Context, req *api.PutFileRequest) (*api.PutFileResponse, error)
- func (s *Server) PutFileAndMigrate(ctx context.Context, req *api.PutFileAndMigrateRequest) (*api.PutFileAndMigrateResponse, error)
- func (s *Server) Query(ctx context.Context, req *api.QueryRequest) (*api.QueryResponse, error)
- func (s *Server) QueryDirect(ctx context.Context, req *api.QueryDirectRequest) (*api.QueryDirectResponse, error)
- func (s *Server) RenameDatabaseObject(ctx context.Context, req *api.RenameDatabaseObjectRequest) (*api.RenameDatabaseObjectResponse, error)
- func (s *Server) RenameFile(ctx context.Context, req *api.RenameFileRequest) (*api.RenameFileResponse, error)
- func (s *Server) RenameFileAndMigrate(ctx context.Context, req *api.RenameFileAndMigrateRequest) (*api.RenameFileAndMigrateResponse, error)
- func (s *Server) ServeGRPC(ctx context.Context) error
- func (s *Server) ServeHTTP(ctx context.Context) error
- func (s *Server) TableCardinality(ctx context.Context, req *api.CardinalityRequest) (*api.CardinalityResponse, error)
- func (s *Server) TableRows(ctx context.Context, req *api.RowsRequest) (*api.RowsResponse, error)
- func (s *Server) TriggerRefresh(ctx context.Context, req *api.TriggerRefreshRequest) (*api.TriggerRefreshResponse, error)
- func (s *Server) TriggerSync(ctx context.Context, req *api.TriggerSyncRequest) (*api.TriggerSyncResponse, error)
- func (s *Server) UploadMultipartFile(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
- type ServerOptions
Constants ¶
const ISO_FORMAT string = "2006-01-02T15:04:05.000Z"
Variables ¶
var ANY_TYPES = map[string]bool{ "BIGINT": true, "HUGEINT": true, "SMALLINT": true, "INTEGER": true, "TINYINT": true, "UBIGINT": true, "UINTEGER": true, "UTINYINT": true, "INT1": true, "INT4": true, "INT": true, "SIGNED": true, "SHORT": true, "DOUBLE": true, "DECIMAL": true, "FLOAT8": true, "NUMERIC": true, "FLOAT": true, "BOOLEAN": true, "BOOL": true, "LOGICAL": true, "TIMESTAMP": true, "TIME": true, "DATETIME": true, "DATE": true, "INTERVAL": true, "BYTE_ARRAY": true, "VARCHAR": true, "CHAR": true, "BPCHAR": true, "TEXT": true, "STRING": true, }
var CATEGORICALS = map[string]bool{ "BOOLEAN": true, "BOOL": true, "LOGICAL": true, "BYTE_ARRAY": true, "VARCHAR": true, "CHAR": true, "BPCHAR": true, "TEXT": true, "STRING": true, }
copy of STRING_LIKES and BOOLEANS map
var DATES = map[string]bool{ "DATE": true, }
var DoubleQuotesRegexp *regexp.Regexp = regexp.MustCompile("\"")
var FLOATS = map[string]bool{ "DOUBLE": true, "DECIMAL": true, "FLOAT8": true, "NUMERIC": true, "FLOAT": true, }
var INTEGERS = map[string]bool{ "BIGINT": true, "HUGEINT": true, "SMALLINT": true, "INTEGER": true, "TINYINT": true, "UBIGINT": true, "UINTEGER": true, "UTINYINT": true, "INT1": true, "INT4": true, "INT": true, "SIGNED": true, "SHORT": true, }
var INTERVALS = map[string]bool{ "INTERVAL": true, }
var NUMERICS = map[string]bool{ "BIGINT": true, "HUGEINT": true, "SMALLINT": true, "INTEGER": true, "TINYINT": true, "UBIGINT": true, "UINTEGER": true, "UTINYINT": true, "INT1": true, "INT4": true, "INT": true, "SIGNED": true, "SHORT": true, "DOUBLE": true, "DECIMAL": true, "FLOAT8": true, "NUMERIC": true, "FLOAT": true, }
NUMERICS It's a copy of INTEGERS and FLOATS map until we have a better way to reference the maps directly
var STRING_LIKES = map[string]bool{ "BYTE_ARRAY": true, "VARCHAR": true, "CHAR": true, "BPCHAR": true, "TEXT": true, "STRING": true, }
var TIMESTAMPS = map[string]bool{ "TIMESTAMP": true, "TIME": true, "DATETIME": true, "DATE": true, }
TIMESTAMPS and DATES map fields
var TypesMap = map[string]map[string]bool{ "INTEGERS": INTEGERS, "FLOATS": FLOATS, "NUMERICS": NUMERICS, "BOOLEANS": BOOLEANS, "TIMESTAMPS": TIMESTAMPS, "INTERVALS": INTERVALS, "CATEGORICALS": CATEGORICALS, "ANY_TYPES": ANY_TYPES, }
Functions ¶
func EscapeDoubleQuotes ¶ added in v0.15.0
func EscapeSingleQuotes ¶ added in v0.15.0
Types ¶
type ColumnInfo ¶ added in v0.15.0
type Server ¶
type Server struct { api.UnsafeRuntimeServiceServer // contains filtered or unexported fields }
func NewServer ¶
func NewServer(opts *ServerOptions, metastore drivers.Connection, logger *zap.Logger) (*Server, error)
func (*Server) CreateInstance ¶
func (s *Server) CreateInstance(ctx context.Context, req *api.CreateInstanceRequest) (*api.CreateInstanceResponse, error)
CreateInstance implements RuntimeService
func (*Server) CreateRepo ¶
func (s *Server) CreateRepo(ctx context.Context, req *api.CreateRepoRequest) (*api.CreateRepoResponse, error)
CreateRepo implements RuntimeService
func (*Server) DeleteFile ¶ added in v0.15.0
func (s *Server) DeleteFile(ctx context.Context, req *api.DeleteFileRequest) (*api.DeleteFileResponse, error)
DeleteFile implements RuntimeService
func (*Server) DeleteFileAndMigrate ¶ added in v0.15.0
func (s *Server) DeleteFileAndMigrate(ctx context.Context, req *api.DeleteFileAndMigrateRequest) (*api.DeleteFileAndMigrateResponse, error)
func (*Server) DeleteInstance ¶
func (s *Server) DeleteInstance(ctx context.Context, req *api.DeleteInstanceRequest) (*api.DeleteInstanceResponse, error)
DeleteInstance implements RuntimeService
func (*Server) DeleteRepo ¶
func (s *Server) DeleteRepo(ctx context.Context, req *api.DeleteRepoRequest) (*api.DeleteRepoResponse, error)
DeleteRepo implements RuntimeService
func (*Server) EstimateRollupInterval ¶ added in v0.15.0
func (s *Server) EstimateRollupInterval(ctx context.Context, req *api.EstimateRollupIntervalRequest) (*api.EstimateRollupIntervalResponse, error)
Metrics APIs
func (*Server) EstimateSmallestTimeGrain ¶ added in v0.15.0
func (s *Server) EstimateSmallestTimeGrain(ctx context.Context, request *api.EstimateSmallestTimeGrainRequest) (*api.EstimateSmallestTimeGrainResponse, error)
func (*Server) GenerateTimeSeries ¶ added in v0.15.0
func (s *Server) GenerateTimeSeries(ctx context.Context, request *api.GenerateTimeSeriesRequest) (*api.TimeSeriesRollup, error)
func (*Server) GetCardinalityOfColumn ¶ added in v0.15.0
func (s *Server) GetCardinalityOfColumn(ctx context.Context, request *api.CardinalityOfColumnRequest) (*api.CategoricalSummary, error)
func (*Server) GetCatalogObject ¶
func (s *Server) GetCatalogObject(ctx context.Context, req *api.GetCatalogObjectRequest) (*api.GetCatalogObjectResponse, error)
GetCatalogObject implements RuntimeService
func (*Server) GetDescriptiveStatistics ¶ added in v0.15.0
func (s *Server) GetDescriptiveStatistics(ctx context.Context, request *api.DescriptiveStatisticsRequest) (*api.NumericSummary, error)
func (*Server) GetFile ¶ added in v0.15.0
func (s *Server) GetFile(ctx context.Context, req *api.GetFileRequest) (*api.GetFileResponse, error)
GetFile implements RuntimeService
func (*Server) GetInstance ¶
func (s *Server) GetInstance(ctx context.Context, req *api.GetInstanceRequest) (*api.GetInstanceResponse, error)
GetInstance implements RuntimeService
func (*Server) GetNullCount ¶ added in v0.15.0
func (s *Server) GetNullCount(ctx context.Context, nullCountRequest *api.NullCountRequest) (*api.NullCountResponse, error)
func (*Server) GetNumericHistogram ¶ added in v0.15.0
func (s *Server) GetNumericHistogram(ctx context.Context, request *api.NumericHistogramRequest) (*api.NumericSummary, error)
func (*Server) GetRepo ¶
func (s *Server) GetRepo(ctx context.Context, req *api.GetRepoRequest) (*api.GetRepoResponse, error)
GetRepo implements RuntimeService
func (*Server) GetRugHistogram ¶ added in v0.15.0
func (s *Server) GetRugHistogram(ctx context.Context, request *api.RugHistogramRequest) (*api.NumericSummary, error)
func (*Server) GetTimeRangeSummary ¶ added in v0.15.0
func (s *Server) GetTimeRangeSummary(ctx context.Context, request *api.TimeRangeSummaryRequest) (*api.TimeRangeSummary, error)
func (*Server) GetTopK ¶ added in v0.14.0
func (s *Server) GetTopK(ctx context.Context, topKRequest *api.TopKRequest) (*api.CategoricalSummary, error)
func (*Server) HTTPHandler ¶ added in v0.15.0
HTTP handler serving REST gateway
func (*Server) ListCatalogObjects ¶
func (s *Server) ListCatalogObjects(ctx context.Context, req *api.ListCatalogObjectsRequest) (*api.ListCatalogObjectsResponse, error)
ListCatalogObjects implements RuntimeService
func (*Server) ListConnectors ¶
func (s *Server) ListConnectors(ctx context.Context, req *api.ListConnectorsRequest) (*api.ListConnectorsResponse, error)
ListConnectors implements RuntimeService
func (*Server) ListFiles ¶ added in v0.15.0
func (s *Server) ListFiles(ctx context.Context, req *api.ListFilesRequest) (*api.ListFilesResponse, error)
ListFiles implements RuntimeService
func (*Server) ListInstances ¶
func (s *Server) ListInstances(ctx context.Context, req *api.ListInstancesRequest) (*api.ListInstancesResponse, error)
ListInstances implements RuntimeService
func (*Server) ListRepos ¶
func (s *Server) ListRepos(ctx context.Context, req *api.ListReposRequest) (*api.ListReposResponse, error)
ListRepos implements RuntimeService
func (*Server) MetricsViewMeta ¶
func (s *Server) MetricsViewMeta(ctx context.Context, req *api.MetricsViewMetaRequest) (*api.MetricsViewMetaResponse, error)
MetricsViewMeta implements RuntimeService
func (*Server) MetricsViewTimeSeries ¶
func (s *Server) MetricsViewTimeSeries(ctx context.Context, req *api.MetricsViewTimeSeriesRequest) (*api.MetricsViewTimeSeriesResponse, error)
MetricsViewTimeSeries implements RuntimeService
func (*Server) MetricsViewToplist ¶
func (s *Server) MetricsViewToplist(ctx context.Context, req *api.MetricsViewToplistRequest) (*api.MetricsViewToplistResponse, error)
MetricsViewToplist implements RuntimeService
func (*Server) MetricsViewTotals ¶
func (s *Server) MetricsViewTotals(ctx context.Context, req *api.MetricsViewTotalsRequest) (*api.MetricsViewTotalsResponse, error)
MetricsViewTotals implements RuntimeService
func (*Server) Migrate ¶
func (s *Server) Migrate(ctx context.Context, req *api.MigrateRequest) (*api.MigrateResponse, error)
Migrate implements RuntimeService
func (*Server) MigrateDelete ¶
func (s *Server) MigrateDelete(ctx context.Context, req *api.MigrateDeleteRequest) (*api.MigrateDeleteResponse, error)
MigrateDelete implements RuntimeService
func (*Server) MigrateSingle ¶
func (s *Server) MigrateSingle(ctx context.Context, req *api.MigrateSingleRequest) (*api.MigrateSingleResponse, error)
MigrateSingle implements RuntimeService NOTE: Everything here is an initial implementation with many flaws.
func (*Server) Ping ¶
func (s *Server) Ping(ctx context.Context, req *api.PingRequest) (*api.PingResponse, error)
Ping implements RuntimeService
func (*Server) ProfileColumns ¶ added in v0.15.0
func (s *Server) ProfileColumns(ctx context.Context, req *api.ProfileColumnsRequest) (*api.ProfileColumnsResponse, error)
func (*Server) PutFile ¶ added in v0.15.0
func (s *Server) PutFile(ctx context.Context, req *api.PutFileRequest) (*api.PutFileResponse, error)
PutFile implements RuntimeService
func (*Server) PutFileAndMigrate ¶ added in v0.15.0
func (s *Server) PutFileAndMigrate(ctx context.Context, req *api.PutFileAndMigrateRequest) (*api.PutFileAndMigrateResponse, error)
PutFileAndMigrate implements RuntimeService
func (*Server) Query ¶
func (s *Server) Query(ctx context.Context, req *api.QueryRequest) (*api.QueryResponse, error)
Query implements RuntimeService
func (*Server) QueryDirect ¶
func (s *Server) QueryDirect(ctx context.Context, req *api.QueryDirectRequest) (*api.QueryDirectResponse, error)
QueryDirect implements RuntimeService
func (*Server) RenameDatabaseObject ¶ added in v0.15.0
func (s *Server) RenameDatabaseObject(ctx context.Context, req *api.RenameDatabaseObjectRequest) (*api.RenameDatabaseObjectResponse, error)
Table level profiling APIs
func (*Server) RenameFile ¶ added in v0.15.0
func (s *Server) RenameFile(ctx context.Context, req *api.RenameFileRequest) (*api.RenameFileResponse, error)
RenameFile implements RuntimeService
func (*Server) RenameFileAndMigrate ¶ added in v0.15.0
func (s *Server) RenameFileAndMigrate(ctx context.Context, req *api.RenameFileAndMigrateRequest) (*api.RenameFileAndMigrateResponse, error)
func (*Server) TableCardinality ¶ added in v0.15.0
func (s *Server) TableCardinality(ctx context.Context, req *api.CardinalityRequest) (*api.CardinalityResponse, error)
func (*Server) TableRows ¶ added in v0.15.0
func (s *Server) TableRows(ctx context.Context, req *api.RowsRequest) (*api.RowsResponse, error)
func (*Server) TriggerRefresh ¶
func (s *Server) TriggerRefresh(ctx context.Context, req *api.TriggerRefreshRequest) (*api.TriggerRefreshResponse, error)
TriggerRefresh implements RuntimeService
func (*Server) TriggerSync ¶ added in v0.15.0
func (s *Server) TriggerSync(ctx context.Context, req *api.TriggerSyncRequest) (*api.TriggerSyncResponse, error)
TriggerSync implements RuntimeService
func (*Server) UploadMultipartFile ¶ added in v0.15.0
func (s *Server) UploadMultipartFile(w http.ResponseWriter, req *http.Request, pathParams map[string]string)
UploadMultipartFile implements the same functionality as PutFile, but for multipart HTTP upload. It's mounted only on as a REST API and enables upload of large files (such as data files).