• DataStax Enterprise C# Driver API Documentation

    Show / Hide Table of Contents
    • Dse
      • AggregateMetadata
      • AlreadyExistsException
      • AtomicMonotonicTimestampGenerator
      • AtomicMonotonicWinApiTimestampGenerator
      • AuthenticationException
      • BatchStatement
      • BatchType
      • BigIntegerTypeAdapter
      • BoundStatement
      • Builder
      • BusyPoolException
      • CassandraConnectionStringBuilder
      • ClientOptions
      • Cluster
      • ColumnDesc
      • ColumnTypeCode
      • CompressionType
      • Configuration
      • ConsistencyLevel
      • ConstantReconnectionPolicy
      • ConstantSpeculativeExecutionPolicy
      • CqlColumn
      • CustomColumnInfo
      • DataCollectionMetadata
      • DataCollectionMetadata.SortOrder
      • DCAwareRoundRobinPolicy
      • DecimalTypeAdapter
      • DefaultRetryPolicy
      • Diagnostics
      • DowngradingConsistencyRetryPolicy
      • DriverException
      • DriverInternalError
      • DseCluster
      • DseClusterBuilder
      • DseConfiguration
      • DseLoadBalancingPolicy
      • Duration
      • DynamicCompositeTypeAdapter
      • EC2MultiRegionTranslator
      • ExecutionException
      • ExecutionInfo
      • ExponentialReconnectionPolicy
      • Extensions
      • FallthroughRetryPolicy
      • FixedReconnectionPolicy
      • FunctionFailureException
      • FunctionMetadata
      • Host
      • HostDistance
      • HostsEventArgs
      • HostsEventArgs.Kind
      • HostsEventHandler
      • IAddressTranslator
      • IAuthenticator
      • IAuthProvider
      • IAuthProviderNamed
      • ICluster
      • IColumnInfo
      • IdempotenceAwareRetryPolicy
      • IDseCluster
      • IDseSession
      • IExecutionProfile
      • IExecutionProfileBuilder
      • IExecutionProfileOptions
      • IExtendedRetryPolicy
      • IFrameCompressor
      • IInitializer
      • ILoadBalancingPolicy
      • IndexMetadata
      • IndexMetadata.IndexKind
      • InvalidConfigurationInQueryException
      • InvalidQueryException
      • InvalidTypeException
      • IReconnectionPolicy
      • IReconnectionSchedule
      • IRetryPolicy
      • IsBootstrappingException
      • ISession
      • ISessionState
      • ISpeculativeExecutionPlan
      • ISpeculativeExecutionPolicy
      • IStatement
      • ITimestampGenerator
      • ITypeAdapter
      • KeyspaceMetadata
      • KeyType
      • ListColumnInfo
      • LocalDate
      • LocalTime
      • Logger
      • LoggingRetryPolicy
      • MapColumnInfo
      • MaterializedViewMetadata
      • Metadata
      • MetadataSyncOptions
      • MetricsExtensions
      • MonitorReportingOptions
      • NoHostAvailableException
      • NoneAuthProvider
      • NoSpeculativeExecutionPolicy
      • NullTypeAdapter
      • OperationTimedOutException
      • OverloadedException
      • PlainTextAuthProvider
      • Policies
      • PoolingOptions
      • PreparedQueryNotFoundException
      • PreparedStatement
      • PreparedStatementIdMismatchException
      • ProtocolErrorException
      • ProtocolOptions
      • ProtocolVersion
      • QueryExecutionException
      • QueryOptions
      • QueryProtocolOptions
      • QueryProtocolOptions.QueryFlags
      • QueryTimeoutException
      • QueryTrace
      • QueryTrace.Event
      • QueryValidationException
      • ReadFailureException
      • ReadTimeoutException
      • RegularStatement
      • ReplicationStrategies
      • RequestInvalidException
      • RetryDecision
      • RetryDecision.RetryDecisionType
      • RetryLoadBalancingPolicy
      • RetryLoadBalancingPolicyEventArgs
      • RoundRobinPolicy
      • RoutingKey
      • Row
      • RowSet
      • RowSetMetadata
      • SchemaChangedEventArgs
      • SchemaChangedEventArgs.Kind
      • SchemaChangedEventHandler
      • ServerErrorException
      • Session
      • SetColumnInfo
      • SimpleStatement
      • SocketOptions
      • SSLOptions
      • Statement
      • SyntaxError
      • TableColumn
      • TableMetadata
      • TableOptions
      • TimeUuid
      • TokenAwarePolicy
      • ToManyConnectionsPerHost
      • TraceRetrievalException
      • TruncateException
      • TupleColumnInfo
      • TypeAdapters
      • UdtColumnInfo
      • UdtMap
      • UdtMap<T>
      • UdtMappingDefinitions
      • UnauthorizedException
      • UnavailableException
      • Unset
      • WriteFailureException
      • WriteTimeoutException
    • Dse.AppMetrics
      • DriverAppMetricsOptions
    • Dse.AppMetrics.MetricTypes
      • IAppMetricsCounter
      • IAppMetricsGauge
      • IAppMetricsMeter
      • IAppMetricsMetric
      • IAppMetricsTimer
    • Dse.AppMetrics.MetricValues
      • IAppMetricsHistogramValue
      • IAppMetricsMeterValue
      • IAppMetricsMetricWithValue<T>
      • IAppMetricsTimerValue
    • Dse.Auth
      • DseGssapiAuthProvider
      • DsePlainTextAuthProvider
    • Dse.Auth.Sspi
      • SspiException
    • Dse.Data
      • CqlBatchTransaction
      • CqlCommand
      • CqlConnection
      • CqlDataAdapter
      • CqlParameter
      • CqlParameterCollection
      • CqlProviderFactory
      • CqlReader
    • Dse.Data.Linq
      • AllowFilteringAttribute
      • Batch
      • ClusteringKeyAttribute
      • ColumnAttribute
      • CompactStorageAttribute
      • CounterAttribute
      • CqlArgumentException
      • CqlCommand
      • CqlConditionalCommand<TEntity>
      • CqlDelete
      • CqlFunction
      • CqlInsert<TEntity>
      • CqlLinqNotSupportedException
      • CqlOperator
      • CqlQuery<TEntity>
      • CqlQueryBase<TEntity>
      • CqlQueryExtensions
      • CqlQuerySingleElement<TEntity>
      • CqlScalar<TEntity>
      • CqlToken
      • CqlUpdate
      • IgnoreAttribute
      • ITable
      • PartitionKeyAttribute
      • SecondaryIndexAttribute
      • SessionExtensions
      • StaticColumnAttribute
      • Table<TEntity>
      • TableAttribute
      • TableType
    • Dse.Geometry
      • GeometryBase
      • LineString
      • Point
      • Polygon
    • Dse.Graph
      • Edge
      • Element
      • GraphNode
      • GraphOptions
      • GraphResultSet
      • GraphStatement
      • IEdge
      • IElement
      • IGraphNode
      • IGraphStatement
      • IPath
      • IProperty
      • IVertex
      • IVertexProperty
      • Path
      • SimpleGraphStatement
      • Vertex
    • Dse.Mapping
      • AppliedInfo<T>
      • ColumnMap
      • Cql
      • CqlQueryOptions
      • IColumnDefinition
      • ICqlBatch
      • ICqlQueryAsyncClient
      • ICqlQueryClient
      • ICqlWriteAsyncClient
      • ICqlWriteClient
      • IMapper
      • IPage<T>
      • ITypeDefinition
      • Map<TPoco>
      • Mapper
      • MappingConfiguration
      • Mappings
      • SortOrder
    • Dse.Mapping.Attributes
      • ClusteringKeyAttribute
      • ColumnAttribute
      • CounterAttribute
      • FrozenAttribute
      • FrozenKeyAttribute
      • FrozenValueAttribute
      • IgnoreAttribute
      • PartitionKeyAttribute
      • SecondaryIndexAttribute
      • StaticColumnAttribute
      • TableAttribute
    • Dse.Mapping.TypeConversion
      • DefaultTypeConverter
      • EnumStringMapper<T>
      • NullableEnumStringMapper<T>
      • TypeConverter
    • Dse.Mapping.Utils
      • MemberInfoExtensions
    • Dse.Metrics
      • DriverMetricsOptions
      • IDriverMetrics
      • IMetric
      • IMetricsRegistry<TMetric>
      • NodeMetric
      • NodeMetric.Counters
      • NodeMetric.Gauges
      • NodeMetric.Meters
      • NodeMetric.Timers
      • SessionMetric
      • SessionMetric.Counters
      • SessionMetric.Gauges
      • SessionMetric.Meters
      • SessionMetric.Timers
    • Dse.Metrics.Abstractions
      • IDriverCounter
      • IDriverGauge
      • IDriverMeter
      • IDriverMetric
      • IDriverMetricsProvider
      • IDriverTimer
    • Dse.Search
      • DateRange
      • DateRangeBound
      • DateRangePrecision
    • Dse.Serialization
      • CustomTypeSerializer<T>
      • TypeSerializer
      • TypeSerializer<T>
      • TypeSerializerDefinitions
      • UdtSerializer

    Struct DateRange

    Represents a range of dates, corresponding to the Apache Solr type DateRangeField.

    A date range can have one or two bounds, namely lower bound and upper bound, to represent an interval of time. Date range bounds are both inclusive. For example:

    • [2015 TO 2016-10] represents from the first day of 2015 to the last day of October 2016
    • 2015 represents during the course of the year 2015.
    • [2017 TO *] represents any date greater or equals to the first day of the year 2017.

    Note that this representation of DateRangeField does not support Dates outside of the range supported by DateTimeOffset: from 1/1/0001 12:00:00 AM +00:00 to 12/31/9999 11:59:59 PM +00:00.

    Implements
    System.IEquatable<DateRange>
    System.IComparable<DateRange>
    Inherited Members
    System.Object.Equals(System.Object, System.Object)
    System.Object.GetType()
    System.Object.ReferenceEquals(System.Object, System.Object)
    Namespace: Dse.Search
    Assembly: Dse.dll
    Syntax
    public struct DateRange : IEquatable<DateRange>, IComparable<DateRange>
    Remarks

    DateRange instances are immutable and thread-safe.

    Constructors

    DateRange(DateRangeBound)

    Creates a new instance of DateRange using a lower bound and an upper bound.

    Consider using Parse(String) to create instances more easily.

    Declaration
    public DateRange(DateRangeBound lowerBound)
    Parameters
    Type Name Description
    DateRangeBound lowerBound

    A value representing the range lower bound, composed by a DateTimeOffset and a precision. Use Unbounded for an open lower bound.

    DateRange(DateRangeBound, DateRangeBound)

    Creates a new instance of DateRange using a lower bound and an upper bound.

    Consider using Parse(String) to create instances more easily.

    Declaration
    public DateRange(DateRangeBound lowerBound, DateRangeBound upperBound)
    Parameters
    Type Name Description
    DateRangeBound lowerBound

    A value representing the range lower bound, composed by a DateTimeOffset and a precision. Use Unbounded for an open lower bound.

    DateRangeBound upperBound

    A value representing the range upper bound, composed by a DateTimeOffset and a precision. Use Unbounded for an open higher bound.

    Properties

    LowerBound

    Gets the lower bound of this range (inclusive).

    Declaration
    public DateRangeBound LowerBound { get; }
    Property Value
    Type Description
    DateRangeBound

    UpperBound

    Gets the upper bound of this range (inclusive).

    Declaration
    public DateRangeBound? UpperBound { get; }
    Property Value
    Type Description
    System.Nullable<DateRangeBound>

    Methods

    CompareTo(DateRange)

    Compares the DateRange based to the bytes representation.

    Declaration
    public int CompareTo(DateRange other)
    Parameters
    Type Name Description
    DateRange other
    Returns
    Type Description
    System.Int32

    Equals(DateRange)

    Returns true if the value of this DateRange instance and other are the same.

    Declaration
    public bool Equals(DateRange other)
    Parameters
    Type Name Description
    DateRange other
    Returns
    Type Description
    System.Boolean

    Equals(Object)

    Declaration
    public override bool Equals(object obj)
    Parameters
    Type Name Description
    System.Object obj
    Returns
    Type Description
    System.Boolean
    Overrides
    System.ValueType.Equals(System.Object)

    GetHashCode()

    Declaration
    public override int GetHashCode()
    Returns
    Type Description
    System.Int32
    Overrides
    System.ValueType.GetHashCode()

    Parse(String)

    Returns the DateRange representation from a given string.

    String representations of dates are always expressed in Coordinated Universal Time(UTC)

    Declaration
    public static DateRange Parse(string value)
    Parameters
    Type Name Description
    System.String value
    Returns
    Type Description
    DateRange
    Exceptions
    Type Condition
    System.FormatException

    ToString()

    Returns the string representation of the instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    System.String
    Overrides
    System.ValueType.ToString()

    Operators

    Equality(DateRange, DateRange)

    Compares value equality of 2 DateRange instances.

    Declaration
    public static bool operator ==(DateRange a, DateRange b)
    Parameters
    Type Name Description
    DateRange a
    DateRange b
    Returns
    Type Description
    System.Boolean

    Inequality(DateRange, DateRange)

    Compares value inequality of 2 DateRange instances.

    Declaration
    public static bool operator !=(DateRange a, DateRange b)
    Parameters
    Type Name Description
    DateRange a
    DateRange b
    Returns
    Type Description
    System.Boolean

    Implements

    System.IEquatable<T>
    System.IComparable<T>
    Back to top © DataStax, All rights reserved.