MCPcopy
hub / github.com/cloudreve/cloudreve / Query

Interface Query

ent/intercept/intercept.go:33–47  ·  view source on GitHub ↗

The Query interface represents an operation that queries a graph. By using this interface, users can write generic code that manipulates query builders of different types.

Source from the content-addressed store, hash-verified

31// By using this interface, users can write generic code that manipulates
32// query builders of different types.
33type Query interface {
34 // Type returns the string representation of the query type.
35 Type() string
36 // Limit the number of records to be returned by this query.
37 Limit(int)
38 // Offset to start from.
39 Offset(int)
40 // Unique configures the query builder to filter duplicate records.
41 Unique(bool)
42 // Order specifies how the records should be ordered.
43 Order(...func(*sql.Selector))
44 // WhereP appends storage-level predicates to the query builder. Using this method, users
45 // can use type-assertion to append predicates that do not depend on any generated package.
46 WhereP(...func(*sql.Selector))
47}
48
49// The Func type is an adapter that allows ordinary functions to be used as interceptors.
50// Unlike traversal functions, interceptors are skipped during graph traversals. Note that the

Callers 34

scanWithInterceptorsFunction · 0.65
sqlQueryMethod · 0.65
sqlQueryMethod · 0.65
sqlQueryMethod · 0.65
sqlQueryMethod · 0.65
sqlQueryMethod · 0.65
sqlQueryMethod · 0.65
sqlQueryMethod · 0.65
sqlQueryMethod · 0.65
sqlQueryMethod · 0.65
sqlQueryMethod · 0.65
sqlQueryMethod · 0.65

Calls

no outgoing calls

Tested by

no test coverage detected