Query Class

Namespace:
Weavy.Core.Models
Assembly:
Weavy.Core.dll

Defines a base class for search queries.

public class Query : QueryOptions, ICloneable
Inheritance:
System.Object → QueryOptionsQuery

Constructors

Query() Initializes a new instance of the Query class.
Query(Query) Initializes a new instance of the Query class with the specified Query.
Query(QueryOptions) Initializes a new instance of the Query class with the specified QueryOptions.

Properties

CreatedAfter Gets or sets a date that limits the result to entities created on or after this date.
CreatedBefore Gets or sets the date that limits the result to entities created on or before this date.
CreatedById Gets or sets the id of a User. Used to find entities created by a specific User, null to ignore the CreatedBy property. Default is null.
CreateOrModifiedById Gets or sets the id of a User. Used to find entities created -or- modified by a specific User, null to ignore the CreateOrModifiedById property. Default is null.
EntityTypes Gets or sets the type of entities to find. Default is an empty list which searches all entities.
Filter Gets or sets a value indicating whether to filter out items where the user does not have View permission, default value is true.
IndexText Gets the actual query text that was sent to the fulltext search engine (only for development/debugging purposes).
ModifiedById Gets or sets the id of a User. Used to find entities modified by a specific User, null to ignore the ModifiedBy property. Default is null.
OrderBy Gets or sets the sort order of the result.
SearchFileContent Gets or sets a value indicating whether the search should include file contents.
SortItems Gets the columns to sort the result by.
SortProperties Gets the possible properties to sort by.
SpaceId Gets or sets the id of a space to search, empty to search all spaces.
Tag Gets or sets a tag for which to find entities.
Text Gets or sets the fulltext query.
Trashed Gets or sets a value indicating whether the search should return trashed entities; true returns only trashed entities, false returns only entities that has not been trashed and null ignores the IsTrashed property. Default is false.

Methods

Clone() Create a deep copy of the current object.

Extension Methods

IsNullOrDefault(T) Gets a value indicating if the specified value has the default value of the generic type.
Serialize(object) Serializes an object, or graph of connected objects, to a byte array.
SerializeToJson(object, Formatting?, JsonSerializerSettings) Serializes an object, or graph of connected objects, to a json string.
IsValid(object) Determines whether the specified object is valid by evaluating each ValidationAttribute instance that is attached to the object type.