Skip to content

Commit

Permalink
Планировщик запросов. Планы #45
Browse files Browse the repository at this point in the history
  • Loading branch information
unhandled-exception committed Oct 12, 2022
1 parent 6a460e2 commit fa3134c
Show file tree
Hide file tree
Showing 22 changed files with 4,255 additions and 24 deletions.
1 change: 1 addition & 0 deletions .golangci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,3 +69,4 @@ linters-settings:
- Constant
- Term
- Statement$
- Scan
5 changes: 5 additions & 0 deletions pkg/planner/errors.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
package planner

import "github.com/pkg/errors"

var ErrFailedToCreatePlan = errors.New("failed to create plan")
15 changes: 15 additions & 0 deletions pkg/planner/plan.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
package planner

import (
"github.com/unhandled-exception/sophiadb/pkg/records"
"github.com/unhandled-exception/sophiadb/pkg/scan"
)

type Plan interface {
Open() (scan.Scan, error)
Schema() records.Schema
BlocksAccessed() int64
Records() int64
DistinctValues(string) (int64, bool)
String() string
}

0 comments on commit fa3134c

Please sign in to comment.