Skip to content

Commit

Permalink
Fix rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
iddan committed Jan 30, 2020
1 parent 6f35720 commit 6500284
Show file tree
Hide file tree
Showing 35 changed files with 42 additions and 43 deletions.
11 changes: 5 additions & 6 deletions internal/linkedql/schema/schema.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ import (
_ "github.com/cayleygraph/cayley/query/linkedql/steps"
"github.com/cayleygraph/quad"
"github.com/cayleygraph/quad/voc/owl"
"github.com/cayleygraph/quad/voc/rdf"
"github.com/cayleygraph/quad/voc/rdfs"
"github.com/cayleygraph/quad/voc/xsd"
)
Expand Down Expand Up @@ -347,11 +346,11 @@ func (g *generator) Generate() []byte {
graph = append(graph, g.out...)
data, err := json.Marshal(map[string]interface{}{
"@context": map[string]interface{}{
"rdf": rdf.NS,
"rdfs": rdfs.NS,
"owl": owl.NS,
"xsd": xsd.NS,
"linkedql": linkedql.Namespace,
"rdf": "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
"rdfs": "http://www.w3.org/2000/01/rdf-schema#",
"owl": "http://www.w3.org/2002/07/owl#",
"xsd": "http://www.w3.org/2001/XMLSchema#",
"linkedql": "http://cayley.io/linkedql#",
"rdfg": rdfgNamespace,
},
"@graph": graph,
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/registry_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ var unmarshalCases = []struct {
type TestStep struct {
Limit int `json:"limit"`
Tags []string `json:"tags"`
From PathStep `json:"from"`
From PathStep `json:"from" minCardinality:"0"`
Sub []PathStep `json:"sub"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/as.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*As)(nil)

// As corresponds to .tag().
type As struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Name string `json:"name"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/back.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Back)(nil)

// Back corresponds to .back().
type Back struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Name string `json:"name"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/both.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Both)(nil)

// Both corresponds to .both().
type Both struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Properties linkedql.PropertyPath `json:"properties"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Context)(nil)

// Context corresponds to context().
type Context struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Rules map[string]string `json:"rules"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/count.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Count)(nil)

// Count corresponds to .count().
type Count struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
}

// Description implements Step.
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/difference.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Difference)(nil)

// Difference corresponds to .difference().
type Difference struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Steps []linkedql.PathStep `json:"steps"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/follow.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Follow)(nil)

// Follow corresponds to .follow().
type Follow struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Followed linkedql.PathStep `json:"followed"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/follow_reverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*FollowReverse)(nil)

// FollowReverse corresponds to .followR().
type FollowReverse struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Followed linkedql.PathStep `json:"followed"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/greater_than.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var _ linkedql.PathStep = (*GreaterThan)(nil)

// GreaterThan corresponds to gt().
type GreaterThan struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Value quad.Value `json:"value"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/greater_than_equals.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var _ linkedql.PathStep = (*GreaterThanEquals)(nil)

// GreaterThanEquals corresponds to gte().
type GreaterThanEquals struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Value quad.Value `json:"value"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/has.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var _ linkedql.PathStep = (*Has)(nil)

// Has corresponds to .has().
type Has struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Property linkedql.PropertyPath `json:"property"`
Values []quad.Value `json:"values"`
}
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/has_reverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var _ linkedql.PathStep = (*HasReverse)(nil)

// HasReverse corresponds to .hasR().
type HasReverse struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Property linkedql.PropertyPath `json:"property"`
Values []quad.Value `json:"values"`
}
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/intersect.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Intersect)(nil)

// Intersect represents .intersect() and .and().
type Intersect struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Steps []linkedql.PathStep `json:"steps"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/is.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var _ linkedql.PathStep = (*Is)(nil)

// Is corresponds to .back().
type Is struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Values []quad.Value `json:"values"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/labels.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Labels)(nil)

// Labels corresponds to .labels().
type Labels struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
}

// Description implements Step.
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/less_than.go
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ var _ linkedql.PathStep = (*LessThan)(nil)

// LessThan corresponds to lt().
type LessThan struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Value quad.Value `json:"value"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/less_than_equals.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var _ linkedql.PathStep = (*LessThanEquals)(nil)

// LessThanEquals corresponds to lte().
type LessThanEquals struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Value quad.Value `json:"value"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/limit.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Limit)(nil)

// Limit corresponds to .limit().
type Limit struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Limit int64 `json:"limit"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/optional.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Optional)(nil)

// Optional corresponds to .optional().
type Optional struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Step linkedql.PathStep `json:"step"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Order)(nil)

// Order corresponds to .order().
type Order struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
}

// Description implements Step.
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var _ linkedql.PathStep = (*Properties)(nil)

// Properties corresponds to .properties().
type Properties struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
// TODO(iddan): Use linkedql.PropertyPath
Names []quad.IRI `json:"names"`
}
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/property_names.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*PropertyNames)(nil)

// PropertyNames corresponds to .propertyNames().
type PropertyNames struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
}

// Description implements Step.
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/property_names_as.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*PropertyNamesAs)(nil)

// PropertyNamesAs corresponds to .propertyNamesAs().
type PropertyNamesAs struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Tag string `json:"tag"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/reverse_properties.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var _ linkedql.PathStep = (*ReverseProperties)(nil)

// ReverseProperties corresponds to .reverseProperties().
type ReverseProperties struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
// TODO(iddan): Use property path
Names []quad.IRI `json:"names"`
}
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/reverse_property_names.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*ReversePropertyNames)(nil)

// ReversePropertyNames corresponds to .reversePropertyNames().
type ReversePropertyNames struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
}

// Description implements Step.
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/reverse_property_names_as.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*ReversePropertyNamesAs)(nil)

// ReversePropertyNamesAs corresponds to .reversePropertyNamesAs().
type ReversePropertyNamesAs struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Tag string `json:"tag"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/skip.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Skip)(nil)

// Skip corresponds to .skip().
type Skip struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Offset int64 `json:"offset"`
}

Expand Down
8 changes: 4 additions & 4 deletions query/linkedql/steps/steps_final.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ var _ linkedql.IteratorStep = (*Select)(nil)
// Select corresponds to .select().
type Select struct {
Tags []string `json:"tags"`
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
}

// Description implements Step.
Expand All @@ -41,7 +41,7 @@ var _ linkedql.IteratorStep = (*SelectFirst)(nil)
// SelectFirst corresponds to .selectFirst().
type SelectFirst struct {
Tags []string `json:"tags"`
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
}

// Description implements Step.
Expand Down Expand Up @@ -70,7 +70,7 @@ var _ linkedql.IteratorStep = (*Value)(nil)

// Value corresponds to .value().
type Value struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
}

// Description implements Step.
Expand All @@ -87,7 +87,7 @@ var _ linkedql.IteratorStep = (*Documents)(nil)

// Documents corresponds to .documents().
type Documents struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
}

// Description implements Step.
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/union.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Union)(nil)

// Union corresponds to .union() and .or().
type Union struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Steps []linkedql.PathStep `json:"steps"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/unique.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Unique)(nil)

// Unique corresponds to .unique().
type Unique struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
}

// Description implements Step.
Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/visit.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Visit)(nil)

// Visit corresponds to .view().
type Visit struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Properties linkedql.PropertyPath `json:"properties"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/visit_reverse.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*VisitReverse)(nil)

// VisitReverse corresponds to .viewReverse().
type VisitReverse struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Properties linkedql.PropertyPath `json:"properties"`
}

Expand Down
2 changes: 1 addition & 1 deletion query/linkedql/steps/where.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ var _ linkedql.PathStep = (*Where)(nil)

// Where corresponds to .where().
type Where struct {
From linkedql.PathStep `json:"from"`
From linkedql.PathStep `json:"from" minCardinality:"0"`
Steps []linkedql.PathStep `json:"steps"`
}

Expand Down

0 comments on commit 6500284

Please sign in to comment.