# hybridse::codec::RowBuilder

`#include <fe_row_codec.h>`

## Summary

| Public functions                                                                                                                                                                                    |           |
| --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | --------- |
| [**RowBuilder**](#function-rowbuilder)(const [hybridse::codec::Schema](https://tobe.gitbook.io/hybridsql/hybridse/shi-yong-wen-dang/namespaces/namespacehybridse_1_1codec#typedef-schema) & schema) |           |
| [**\~RowBuilder**](#function-~rowbuilder)() =default                                                                                                                                                |           |
| [**CalTotalLength**](#function-caltotallength)(uint32\_t string\_length)                                                                                                                            | uint32\_t |
| [**SetBuffer**](#function-setbuffer)(int8\_t \* buf, uint32\_t size)                                                                                                                                | bool      |
| [**SetBuffer**](#function-setbuffer)(int64\_t buf\_handle, uint32\_t size)                                                                                                                          | bool      |
| [**SetBuffer**](#function-setbuffer)(const hybridse::base::RawBuffer & buf)                                                                                                                         | bool      |
| [**AppendBool**](#function-appendbool)(bool val)                                                                                                                                                    | bool      |
| [**AppendInt32**](#function-appendint32)(int32\_t val)                                                                                                                                              | bool      |
| [**AppendInt16**](#function-appendint16)(int16\_t val)                                                                                                                                              | bool      |
| [**AppendInt64**](#function-appendint64)(int64\_t val)                                                                                                                                              | bool      |
| [**AppendTimestamp**](#function-appendtimestamp)(int64\_t val)                                                                                                                                      | bool      |
| [**AppendDate**](#function-appenddate)(int32\_t year, int32\_t month, int32\_t day)                                                                                                                 | bool      |
| [**AppendFloat**](#function-appendfloat)(float val)                                                                                                                                                 | bool      |
| [**AppendDouble**](#function-appenddouble)(double val)                                                                                                                                              | bool      |
| [**AppendString**](#function-appendstring)(const char \* val, uint32\_t length)                                                                                                                     | bool      |
| [**AppendNULL**](#function-appendnull)()                                                                                                                                                            | bool      |

## Public Functions

#### function RowBuilder

```cpp
explicit RowBuilder(
    const hybridse::codec::Schema & schema
)
```

#### function \~RowBuilder

```cpp
~RowBuilder() =default
```

#### function CalTotalLength

```cpp
uint32_t CalTotalLength(
    uint32_t string_length
)
```

#### function SetBuffer

```cpp
bool SetBuffer(
    int8_t * buf,
    uint32_t size
)
```

#### function SetBuffer

```cpp
bool SetBuffer(
    int64_t buf_handle,
    uint32_t size
)
```

#### function SetBuffer

```cpp
bool SetBuffer(
    const hybridse::base::RawBuffer & buf
)
```

#### function AppendBool

```cpp
bool AppendBool(
    bool val
)
```

#### function AppendInt32

```cpp
bool AppendInt32(
    int32_t val
)
```

#### function AppendInt16

```cpp
bool AppendInt16(
    int16_t val
)
```

#### function AppendInt64

```cpp
bool AppendInt64(
    int64_t val
)
```

#### function AppendTimestamp

```cpp
bool AppendTimestamp(
    int64_t val
)
```

#### function AppendDate

```cpp
bool AppendDate(
    int32_t year,
    int32_t month,
    int32_t day
)
```

#### function AppendFloat

```cpp
bool AppendFloat(
    float val
)
```

#### function AppendDouble

```cpp
bool AppendDouble(
    double val
)
```

#### function AppendString

```cpp
bool AppendString(
    const char * val,
    uint32_t length
)
```

#### function AppendNULL

```cpp
bool AppendNULL()
```
