我有事件和 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'
}
]
};