I have events and an events_date objects and want to know how to do a join query like this:
select *
from events, events_dates
where events.objectid=event_dates.eventID
order by event_dates.startDate asc
here is my schema. I have included this so you can see how simple this is, however doing a join is very difficult using the 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'
}
]
};