MCPcopy Create free account
hub / github.com/DeusData/codebase-memory-mcp / emit_index

Function emit_index

internal/cbm/iris_export_xml.c:278–302  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

276}
277
278static void emit_index(UdlBuf *b, const char *is_, const char *ie) {
279 char in_[MAX_NAME];
280 extract_attr(is_, ie, "name", in_, sizeof(in_));
281 if (!in_[0])
282 return;
283 char props[MAX_NAME * 4] = "";
284 elem_content(is_, ie, "Properties", props, sizeof(props));
285 bool uniq = tag_is_one(is_, ie, "Unique");
286 bool pkey = tag_is_one(is_, ie, "PrimaryKey");
287 ub_app(b, "Index ");
288 ub_app(b, in_);
289 if (props[0]) {
290 ub_app(b, " On ");
291 ub_app(b, props);
292 }
293 if (uniq || pkey) {
294 ub_app(b, " [ ");
295 if (pkey)
296 ub_app(b, "PrimaryKey, ");
297 if (uniq)
298 ub_app(b, "Unique");
299 ub_app(b, " ]");
300 }
301 ub_app(b, ";\n\n");
302}
303
304static void emit_xdata(UdlBuf *b, const char *xs, const char *xe) {
305 char xn[MAX_NAME];

Callers 1

transcode_classFunction · 0.85

Calls 4

extract_attrFunction · 0.85
elem_contentFunction · 0.85
tag_is_oneFunction · 0.85
ub_appFunction · 0.85

Tested by

no test coverage detected