@elizaos/plugin-sql 1.2.1 → 1.2.3

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
@@ -841,7 +841,7 @@ var BaseDrizzleAdapter = class extends DatabaseAdapter {
841
841
  * @param {UUID[]} entityIds - The unique identifiers of the entities to retrieve.
842
842
  * @returns {Promise<Entity[] | null>} A Promise that resolves to the entity with its components if found, null otherwise.
843
843
  */
844
- async getEntityByIds(entityIds) {
844
+ async getEntitiesByIds(entityIds) {
845
845
  return this.withDatabase(async () => {
846
846
  const result = await this.db.select({
847
847
  entity: entityTable,
@@ -946,7 +946,7 @@ var BaseDrizzleAdapter = class extends DatabaseAdapter {
946
946
  return false;
947
947
  }
948
948
  try {
949
- const existingEntities = await this.getEntityByIds([entity.id]);
949
+ const existingEntities = await this.getEntitiesByIds([entity.id]);
950
950
  if (!existingEntities || !existingEntities.length) {
951
951
  return await this.createEntities([entity]);
952
952
  }
@@ -2033,7 +2033,7 @@ var BaseDrizzleAdapter = class extends DatabaseAdapter {
2033
2033
  entityId: participantTable.entityId,
2034
2034
  roomId: participantTable.roomId
2035
2035
  }).from(participantTable).where(eq(participantTable.entityId, entityId));
2036
- const entities = await this.getEntityByIds([entityId]);
2036
+ const entities = await this.getEntitiesByIds([entityId]);
2037
2037
  if (!entities || !entities.length) {
2038
2038
  return [];
2039
2039
  }
@@ -3070,8 +3070,8 @@ var PgDatabaseAdapter = class extends BaseDrizzleAdapter {
3070
3070
  createEntities(entities) {
3071
3071
  return super.createEntities(entities);
3072
3072
  }
3073
- getEntityByIds(entityIds) {
3074
- return super.getEntityByIds(entityIds).then((result) => result || []);
3073
+ getEntitiesByIds(entityIds) {
3074
+ return super.getEntitiesByIds(entityIds).then((result) => result || []);
3075
3075
  }
3076
3076
  updateEntity(entity) {
3077
3077
  return super.updateEntity(entity);