/// <summary> /// Constructs an instance without performing any validation. (Callers must validate.) /// </summary> private SpannerCommandTextBuilder(string commandText, SpannerCommandType type, string targetTable, string[] extraStatements, ReadOptions readOptions = null) { CommandText = commandText; SpannerCommandType = type; TargetTable = targetTable; ExtraStatements = extraStatements?.ToList().AsReadOnly(); ReadOptions = readOptions; }
/// <summary> /// Creates a <see cref="SpannerCommandTextBuilder"/> instance that generates <see cref="SpannerCommand.CommandText"/> /// for reading rows. /// </summary> /// <param name="table">The name of the Spanner database table from which rows will be read. /// Must not be null.</param> /// <param name="readOptions">The read options to use for the command. Must not be null.</param> /// <returns>A <see cref="SpannerCommandTextBuilder"/> representing a <see cref="F:SpannerCommandType.Read"/> Spanner command.</returns> internal static SpannerCommandTextBuilder CreateReadTextBuilder(string table, ReadOptions readOptions) => new SpannerCommandTextBuilder(commandText: "", SpannerCommandType.Read, ValidateTableName(table, nameof(table)), null, GaxPreconditions.CheckNotNull(readOptions, nameof(readOptions)));