クエリエンジンAPI
AI Marketerのバックエンドは、データベースレイヤーとより低いレベルで対話するためのクエリエンジンAPIを提供しています。
✋ Caution
In most cases you should not use the Query Engine API and rather use the Document Service API.
Only use the Query Engine API if you exactly know what you are doing, for instance if you want to use a lower-level API that directly interacts with unique rows of the database.
Please keep in mind that the Query Engine API is not aware of the most advanced Strapi 5 features like Draft & Publish, Internationalization, Content History, and possibly more.
基本的な使用方法
クエリエンジンは AI Marketer.db.query を通じて利用できます:
AI Marketer.db.query('api::blog.article').findMany({ // uid syntax: 'api::api-name.content-type-name'
where: {
title: {
$startsWith: '2021',
$endsWith: 'v4',
},
},
populate: {
category: true,
},
});
利用可能な操作
クエリエンジンは、データベースエントリーに対して以下の操作を許可します: