forked from ravendb/ravendb-go-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmore_like_this_builder.go
43 lines (33 loc) · 1.12 KB
/
more_like_this_builder.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package ravendb
var _ IMoreLikeThisOperations = &MoreLikeThisBuilder{}
var _ IMoreLikeThisBuilderForDocumentQuery = &MoreLikeThisBuilder{}
var _ IMoreLikeThisBuilderBase = &MoreLikeThisBuilder{}
type MoreLikeThisBuilder struct {
moreLikeThis MoreLikeThisBase
}
func NewMoreLikeThisBuilder() *MoreLikeThisBuilder {
return &MoreLikeThisBuilder{}
}
func (b *MoreLikeThisBuilder) GetMoreLikeThis() MoreLikeThisBase {
return b.moreLikeThis
}
func (b *MoreLikeThisBuilder) UsingAnyDocument() IMoreLikeThisOperations {
b.moreLikeThis = NewMoreLikeThisUsingAnyDocument()
return b
}
func (b *MoreLikeThisBuilder) UsingDocument(documentJSON string) IMoreLikeThisOperations {
b.moreLikeThis = &MoreLikeThisUsingDocument{
documentJSON: documentJSON,
}
return b
}
func (b *MoreLikeThisBuilder) UsingDocumentWithBuilder(builder func(*DocumentQuery)) IMoreLikeThisOperations {
tmp := NewMoreLikeThisUsingDocumentForDocumentQuery()
tmp.setForDocumentQuery(builder)
b.moreLikeThis = tmp
return b
}
func (b *MoreLikeThisBuilder) WithOptions(options *MoreLikeThisOptions) IMoreLikeThisOperations {
b.moreLikeThis.SetOptions(options)
return b
}