sonamu 0.10.2 → 0.10.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -215,6 +215,14 @@ export class Template__generated extends Template {
215
215
  .filter((prop) => prop.type === "vector" || prop.type === "vector[]")
216
216
  .map((prop) => prop.name);
217
217
 
218
+ /**
219
+ * JSON props
220
+ * - json 타입인 컬럼
221
+ */
222
+ const jsonColumns = entity.props
223
+ .filter((prop) => prop.type === "json")
224
+ .map((prop) => prop.name);
225
+
218
226
  /**
219
227
  * generated props
220
228
  * - generated 속성이 있는 컬럼 (INSERT/UPDATE 시 값 제공 불가)
@@ -232,7 +240,8 @@ export class Template__generated extends Template {
232
240
  virtualQueryProps.length > 0 ||
233
241
  hasDefaultColumns.length > 0 ||
234
242
  generatedColumns.length > 0 ||
235
- hasVectorColumns.length > 0;
243
+ hasVectorColumns.length > 0 ||
244
+ jsonColumns.length > 0;
236
245
 
237
246
  const lines = [
238
247
  `export const ${schemaName} = ${schemaBody};`,
@@ -264,6 +273,11 @@ export class Template__generated extends Template {
264
273
  ? `readonly __vector__: readonly [${hasVectorColumns
265
274
  .map((col) => `"${col}"`)
266
275
  .join(", ")}],`
276
+ : "") +
277
+ (jsonColumns.length > 0
278
+ ? `readonly __json__: readonly [${jsonColumns
279
+ .map((col) => `"${col}"`)
280
+ .join(", ")}],`
267
281
  : "")
268
282
  }}`
269
283
  : "") +