Пример #1
0
    public CreateTableRequest(CreateTableRequestPB request)
    {
        MethodName = "CreateTable";
        _request   = request;

        // We don't need to set required feature ADD_DROP_RANGE_PARTITIONS here,
        // as it's supported in Kudu 1.3, the oldest version this client supports.
    }
Пример #2
0
    /// <summary>
    /// Creates a new table builder with the given table name.
    /// </summary>
    /// <param name="tableName">The table's name.</param>
    public TableBuilder(string?tableName = null)
    {
        _createTableRequest = new CreateTableRequestPB
        {
            Schema          = new SchemaPB(),
            PartitionSchema = new PartitionSchemaPB
            {
                RangeSchema = new PartitionSchemaPB.Types.RangeSchemaPB()
            },
            SplitRowsRangeBounds = new RowOperationsPB()
        };

        if (tableName is not null)
        {
            _createTableRequest.Name = tableName;
        }

        _splitRowsRangeBounds = new List <PartialRowOperation>();
    }