Skip to content

Commit

Permalink
Merge pull request #47 from unhandled-exception/feature/45/planner-plans
Browse files Browse the repository at this point in the history
Планировщик запросов. Планы #45
  • Loading branch information
unhandled-exception committed Oct 12, 2022
2 parents 6a460e2 + 8168660 commit 7b33726
Show file tree
Hide file tree
Showing 24 changed files with 4,479 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 7b33726

Please sign in to comment.