| 1279 | } |
| 1280 | |
| 1281 | bool sourceEnsureField( |
| 1282 | void* ctx, TopicHandle topic, PJ_string_view_t field_name, PJ_primitive_type_t type, FieldHandle* out_field, |
| 1283 | PJ_error_t* out_error) noexcept { |
| 1284 | return guardHostCallback(out_error, [&] { |
| 1285 | auto* impl = static_cast<DatastoreSourceWriteHostState*>(ctx); |
| 1286 | auto core = impl->core.load(std::memory_order_acquire); |
| 1287 | if (!core->ensureField(topic, toStringView(field_name), type, out_field)) { |
| 1288 | propagateError(out_error, core->lastError()); |
| 1289 | return false; |
| 1290 | } |
| 1291 | return true; |
| 1292 | }); |
| 1293 | } |
| 1294 | |
| 1295 | bool sourceAppendRecord( |
| 1296 | void* ctx, TopicHandle topic, int64_t timestamp, const PJ_named_field_value_t* fields, uint64_t field_count, |
nothing calls this directly
no test coverage detected