File tree Expand file tree Collapse file tree 2 files changed +12
-0
lines changed
Expand file tree Collapse file tree 2 files changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,15 @@ void ColumnString::Append(std::string_view str) {
202202 items_.emplace_back (blocks_.back ().AppendUnsafe (str));
203203}
204204
205+ void ColumnString::Append (const char * str) {
206+ auto len = strlen (str);
207+ if (blocks_.size () == 0 || blocks_.back ().GetAvailable () < len) {
208+ blocks_.emplace_back (std::max (DEFAULT_BLOCK_SIZE, len));
209+ }
210+
211+ items_.emplace_back (blocks_.back ().AppendUnsafe (str));
212+ }
213+
205214void ColumnString::Append (std::string&& steal_value) {
206215 append_data_.emplace_back (std::move (steal_value));
207216 auto & last_data = append_data_.back ();
Original file line number Diff line number Diff line change @@ -86,6 +86,9 @@ class ColumnString : public Column {
8686 // / Appends one element to the column.
8787 void Append (std::string_view str);
8888
89+ // / Appends one element to the column.
90+ void Append (const char * str);
91+
8992 // / Appends one element to the column.
9093 void Append (std::string&& steal_value);
9194
You can’t perform that action at this time.
0 commit comments