/// <summary> /// Copy constructor /// </summary> /// <param name="parameters">The object to copy values from</param> public Parameters([NotNull] Parameters parameters) { CBDebug.MustNotBeNull(Log.To.Query, Tag, nameof(parameters), parameters); _params = new Dictionary <string, object>(parameters._params); }
public static IExpression Radians([NotNull] IExpression expression) => new QueryCompoundExpression("RADIANS()", CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
public static IExpression Trunc([NotNull] IExpression expression, [NotNull] IExpression digits) => new QueryCompoundExpression("TRUNC()", CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression), CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(digits), digits));
public static IExpression Degrees([NotNull] IExpression expression) => new QueryCompoundExpression("DEGREES()", CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
public static IExpression MillisToString([NotNull] IExpression expression) => new QueryCompoundExpression("MILLIS_TO_STR()", CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
public IWhere Where([NotNull] IExpression expression) { CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression); return(new Where(this, expression)); }
public IExpression Satisfies([NotNull] IExpression expression) { CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression); _predicate = Misc.TryCast <IExpression, QueryExpression>(expression); return(this); }
public IExpression Or([NotNull] IExpression expression) => new QueryCompoundExpression("OR", this, CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
public IExpression Regex([NotNull] IExpression expression) => GetOperator(BinaryOpType.RegexLike, CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
public IExpression GreaterThan([NotNull] IExpression expression) => GetOperator(BinaryOpType.GreaterThan, CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
public IExpression NotEqualTo([NotNull] IExpression expression) => GetOperator(BinaryOpType.NotEqualTo, CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
public IExpression Match([NotNull] string query) { CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(query), query); _subpredicates[_subpredicates.Length - 1] = Expression.String(query); return(this); }
public static IValueIndexItem Expression([NotNull] IExpression expression) => new QueryIndexItem(CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
public IFrom From([NotNull] IDataSource dataSource) { CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(dataSource), dataSource); return(new From(this, dataSource)); }
public IJoins Join([ItemNotNull] params IJoin[] joins) { CBDebug.ItemsMustNotBeNull(WriteLog.To.Query, Tag, nameof(joins), joins); ValidateParams(joins); return(new QueryJoin(this, joins)); }
public IExpression Match([NotNull] IExpression expression) => GetOperator(BinaryOpType.Matches, CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
public IOrderBy OrderBy([ItemNotNull] params IOrdering[] orderings) { CBDebug.ItemsMustNotBeNull(WriteLog.To.Query, Tag, nameof(orderings), orderings); ValidateParams(orderings); return(new QueryOrderBy(this, orderings)); }
/// <summary> /// Constructs a replicator based on the given <see cref="ReplicatorConfiguration"/> /// </summary> /// <param name="config">The configuration to use to create the replicator</param> public Replicator([NotNull] ReplicatorConfiguration config) { Config = CBDebug.MustNotBeNull(WriteLog.To.Sync, Tag, nameof(config), config).Freeze(); _databaseThreadSafety = Config.Database.ThreadSafety; }
public IArrayExpressionSatisfies In([NotNull] IExpression expression) { CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression); _in = expression; return(this); }
/// <summary> /// Adds a documents ended listener on this replication object (similar to a C# event) /// </summary> /// <remarks> /// Make sure add documents ended listener on this replication object before starting the replicator. /// </remarks> /// <param name="handler">The logic to run during the callback</param> /// <returns>A token to remove the handler later</returns> public ListenerToken AddDocumentReplicationListener([NotNull] EventHandler <DocumentReplicationEventArgs> handler) { CBDebug.MustNotBeNull(WriteLog.To.Sync, Tag, nameof(handler), handler); return(AddDocumentReplicationListener(null, handler)); }
public static IExpression Contains([NotNull] IExpression expression, [NotNull] IExpression substring) => new QueryCompoundExpression("CONTAINS()", CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression), CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(substring), substring));
public static IFullTextIndex FullTextIndex([ItemNotNull] params IFullTextIndexItem[] items) => new QueryIndex((IFullTextIndexItem[])CBDebug.ItemsMustNotBeNull(WriteLog.To.Query, Tag, nameof(items), items));
public static IExpression Length([NotNull] IExpression expression) => new QueryCompoundExpression("LENGTH()", CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
/// <summary> /// Constructor using the given cookie name /// </summary> /// <param name="sessionID"><see cref="SessionID"/></param> /// <param name="cookieName"><see cref="CookieName"/></param> public SessionAuthenticator([NotNull] string sessionID, [NotNull] string cookieName) { SessionID = CBDebug.MustNotBeNull(Log.To.Sync, Tag, nameof(sessionID), sessionID); CookieName = CBDebug.MustNotBeNull(Log.To.Sync, Tag, nameof(cookieName), cookieName); }
public static IExpression Power([NotNull] IExpression b, [NotNull] IExpression exponent) => new QueryCompoundExpression("POWER()", CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(b), b), CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(exponent), exponent));
/// <inheritdoc /> public bool Contains([NotNull] string key) { CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(key), key); return(IndexForColumnName(key) >= 0); }
public static IExpression StringToUTC([NotNull] IExpression expression) => new QueryCompoundExpression("STR_TO_UTC()", CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
public IGroupBy GroupBy([ItemNotNull] params IExpression[] expressions) { CBDebug.ItemsMustNotBeNull(WriteLog.To.Query, Tag, nameof(expressions), expressions); ValidateParams(expressions); return(new QueryGroupBy(this, expressions)); }
public static IExpression Atan([NotNull] IExpression expression) => new QueryCompoundExpression("ATAN()", CBDebug.MustNotBeNull(WriteLog.To.Query, Tag, nameof(expression), expression));
/// <summary> /// Creates a blob given a type and streaming content /// </summary> /// <param name="contentType">The binary type of the blob</param> /// <param name="stream">The stream containing the blob content</param> /// <returns>An instantiated <see cref="Blob" /> object</returns> /// <exception cref="ArgumentNullException">Thrown if <c>stream</c> is <c>null</c></exception> public Blob(string contentType, [NotNull] Stream stream) { ContentType = contentType; _initialContentStream = CBDebug.MustNotBeNull(Log.To.Database, Tag, nameof(stream), stream); }