1//  Copyright (c) 2014 Couchbase, Inc.
2//  Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file
3//  except in compliance with the License. You may obtain a copy of the License at
4//    http://www.apache.org/licenses/LICENSE-2.0
5//  Unless required by applicable law or agreed to in writing, software distributed under the
6//  License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
7//  either express or implied. See the License for the specific language governing permissions
8//  and limitations under the License.
9
10package algebra
11
12import (
13	"github.com/couchbase/query/datastore"
14)
15
16type IndexRefs []*IndexRef
17
18type IndexRef struct {
19	name  string              `json:"name"`
20	using datastore.IndexType `json:"using"`
21}
22
23func NewIndexRef(name string, using datastore.IndexType) *IndexRef {
24	return &IndexRef{name, using}
25}
26
27func (this *IndexRef) Name() string {
28	return this.name
29}
30
31func (this *IndexRef) Using() datastore.IndexType {
32	return this.using
33}
34