@mastra/clickhouse 1.15.0 → 1.15.1

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.
package/dist/index.js CHANGED
@@ -583,7 +583,7 @@ var ClickhouseDB = class extends MastraBase {
583
583
  ${this.ttl?.[tableName]?.row ? `TTL toDateTime(createdAt) + INTERVAL ${this.ttl[tableName].row.interval} ${this.ttl[tableName].row.unit}` : ""}
584
584
  SETTINGS index_granularity = 8192
585
585
  `;
586
- await this.client.query({
586
+ await this.client.command({
587
587
  query: applyReplicationToDDL(sql, this.replication),
588
588
  clickhouse_settings: {
589
589
  date_time_input_format: "best_effort",
@@ -614,7 +614,7 @@ var ClickhouseDB = class extends MastraBase {
614
614
  if (columnDef.nullable !== false) sqlType = `Nullable(${sqlType})`;
615
615
  const defaultValue = columnDef.nullable === false ? getDefaultValue(columnDef.type) : "";
616
616
  const alterSql = `ALTER TABLE ${tableName} ADD COLUMN IF NOT EXISTS "${columnName}" ${sqlType} ${defaultValue}`.trim();
617
- await this.client.query({ query: addOnClusterToDDL(alterSql, this.replication) });
617
+ await this.client.command({ query: addOnClusterToDDL(alterSql, this.replication) });
618
618
  this.logger?.debug?.(`Added column ${columnName} to table ${tableName}`);
619
619
  }
620
620
  } catch (error) {
@@ -644,7 +644,7 @@ var ClickhouseDB = class extends MastraBase {
644
644
  }
645
645
  async dropTable({ tableName }) {
646
646
  try {
647
- await this.client.query({ query: addOnClusterToDDL(`DROP TABLE IF EXISTS ${tableName}`, this.replication) });
647
+ await this.client.command({ query: addOnClusterToDDL(`DROP TABLE IF EXISTS ${tableName}`, this.replication) });
648
648
  } catch (error) {
649
649
  throw new MastraError({
650
650
  id: createStorageErrorId("CLICKHOUSE", "DROP_TABLE", "FAILED"),