> ## Documentation Index
> Fetch the complete documentation index at: https://private-7c7dfe99-postgresql-tls-support.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# إعدادات التنسيق format_schema_*

> إعدادات تنسيق ClickHouse ضمن المجموعة المُولَّدة format_schema_*.

export const VersionHistory = ({rows = []}) => {
  if (rows.length === 0) {
    return null;
  }
  const headers = ["الإصدار", "القيمة الافتراضية", "ملاحظة"];
  const border = "1px solid rgba(128, 128, 128, 0.3)";
  const cell = {
    border,
    padding: "0.25rem 0.5rem",
    textAlign: "start",
    verticalAlign: "top"
  };
  return <details className="not-prose" style={{
    border,
    borderRadius: "0.5rem",
    margin: "0.5rem 0",
    padding: "0.5rem 0.75rem",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <summary style={{
    cursor: "pointer",
    fontWeight: 600,
    opacity: 0.72
  }}>
        سجل الإصدارات
      </summary>
      <table style={{
    borderCollapse: "collapse",
    width: "100%",
    margin: "0.5rem 0 0"
  }}>
        <thead>
          <tr>
            {headers.map(header => <th key={header} style={{
    ...cell,
    fontWeight: 600,
    opacity: 0.72
  }}>
                {header}
              </th>)}
          </tr>
        </thead>
        <tbody>
          {rows.map((row, row_index) => <tr key={row.id ?? row_index}>
              {(row.items ?? []).map((item, item_index) => <td key={item_index} style={{
    ...cell,
    overflowWrap: "anywhere"
  }}>
                  {item?.label}
                </td>)}
            </tr>)}
        </tbody>
      </table>
    </details>;
};

export const SettingsInfoBlock = ({type, default_value, changeable_without_restart}) => {
  return <div className="not-prose" style={{
    display: "flex",
    flexWrap: "wrap",
    alignItems: "baseline",
    columnGap: "0.5rem",
    rowGap: "0.125rem",
    margin: "0.375rem 0",
    fontSize: "0.8125rem",
    lineHeight: "1.125rem"
  }}>
      <div style={{
    fontWeight: 600,
    opacity: 0.72
  }}>النوع</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{type}</div>
      <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>القيمة الافتراضية</div>
      <div style={{
    overflowWrap: "anywhere"
  }}>{default_value}</div>
      {changeable_without_restart && <div style={{
    fontWeight: 600,
    opacity: 0.72,
    marginInlineStart: "0.5rem"
  }}>
          يمكن تغييره دون إعادة التشغيل
        </div>}
      {changeable_without_restart && <div style={{
    overflowWrap: "anywhere"
  }}>
          {changeable_without_restart}
        </div>}
    </div>;
};

هذه الإعدادات مُولَّدة تلقائيًا من [المصدر](https://github.com/ClickHouse/ClickHouse/blob/master/src/Core/FormatFactorySettings.h).

<div id="format_schema">
  ## format\_schema
</div>

تفيد هذه المعلمة عند استخدام تنسيقات تتطلب تعريفًا للمخطط، مثل [Cap'n Proto](https://capnproto.org/) أو [Protobuf](https://developers.google.com/protocol-buffers/). وتعتمد القيمة على التنسيق.

<div id="format_schema_message_name">
  ## format\_schema\_message\_name
</div>

حدِّد اسم الرسالة المطلوبة في المخطط المحدد في `format_schema`.
للحفاظ على التوافق مع تنسيق `format_schema` القديم (`file_name:message_name`):

* إذا لم يتم تحديد `format_schema_message_name`، فسيُستدل على اسم الرسالة من جزء `message_name` في قيمة `format_schema` القديمة.
* إذا تم تحديد `format_schema_message_name` عند استخدام التنسيق القديم، فسيتم إصدار خطأ.

<div id="format_schema_source">
  ## format\_schema\_source
</div>

<SettingsInfoBlock type="String" default_value="file" />

حدّد مصدر `format_schema`.
القيم الممكنة:

* 'file' (الافتراضي): يكون `format_schema` اسم ملف مخطط موجود في الدليل `format_schemas`.
* 'string': يكون `format_schema` المحتوى الحرفي للمخطط.
* 'query': يكون `format_schema` استعلامًا لاسترجاع المخطط.
  عند ضبط `format_schema_source` على 'query'، تنطبق الشروط التالية:
* يجب أن يُرجع الاستعلام قيمة واحدة فقط: صفًا واحدًا بعمود نصي واحد.
* تُعامَل نتيجة الاستعلام على أنها محتوى المخطط.
* تُخزَّن هذه النتيجة مؤقتًا محليًا في الدليل `format_schemas`.
* يمكنك مسح الذاكرة المؤقتة المحلية باستخدام الأمر: `SYSTEM DROP FORMAT SCHEMA CACHE FOR Files`.
* بعد تخزينها مؤقتًا، لا تُنفَّذ الاستعلامات المتطابقة مرة أخرى لجلب المخطط إلى أن تُمسَح الذاكرة المؤقتة صراحةً
* بالإضافة إلى ملفات الذاكرة المؤقتة المحلية، تُخزَّن أيضًا رسائل Protobuf مؤقتًا في الذاكرة. وحتى بعد مسح ملفات الذاكرة المؤقتة المحلية، يجب مسح الذاكرة المؤقتة الموجودة في الذاكرة باستخدام `SYSTEM DROP FORMAT SCHEMA CACHE [FOR Protobuf]` لتحديث المخطط بالكامل.
* شغّل الاستعلام `SYSTEM DROP FORMAT SCHEMA CACHE` لمسح الذاكرة المؤقتة لكلٍّ من ملفات الذاكرة المؤقتة ومخططات رسائل Protobuf دفعةً واحدة.
