イベントと events_date オブジェクトがあり、次のような結合クエリを実行する方法を知りたいです。
select *
from events, events_dates
where events.objectid=event_dates.eventID
order by event_dates.startDate asc
これが私のスキーマです。これを含めたので、これがいかに簡単かがわかりますが、ydn-db API を使用して結合を行うのは非常に困難です。
var events_schema = {
name: 'events',
keyPath: 'objectid',
type: 'TEXT',
autoIncrement: false,
indexes: [
{
keyPath: 'eventName'
}, {
keyPath: 'contactPerson'
}, {
keyPath: 'contactPersonEmail'
}, {
keyPath: 'contactPersonCell'
}, {
keyPath: 'eventURL'
}, {
keyPath: 'city'
}, {
keyPath: 'address'
}, {
keyPath: 'parishStateProvince'
}, {
keyPath: 'country'
}, {
keyPath: 'isFeatured'
}, {
keyPath: 'shortDescription'
}, {
keyPath: 'salesCutOffHour'
}, {
keyPath: 'venu'
}, {
keyPath: 'longDescription'
}, {
keyPath: 'createdAt'
}
]
};
var events_dates_schema = {
name: 'event_dates',
keyPath: 'objectid',
type: 'TEXT',
autoIncrement: false,
indexes: [
{
keyPath: 'eventID'
}, {
keyPath: 'deliveryMethodMobile'
}, {
keyPath: 'deliveryMethodWillCall'
}, {
keyPath: 'endDate'
}, {
keyPath: 'endAmPm'
}, {
keyPath: 'maxAvailableTickets'
}, {
keyPath: 'salesCutOffHour'
}, {
keyPath: 'startAmPm'
}, {
keyPath: 'startDate'
}
]
};