select expression helper
I got this selectExpression that i use in many file
.select([
'e.id',
eventStartDate('e'),
eventEndDate('e'),
'e.title',
'e.type',
'e.status',
'e.banner',
'e.event_end_date as end_date',
'e.location',
'e.duration_in_minute',
'e.participant_count_limit',
'e.registration_date_limit',
'e.provider',
coordinates('e'),
sql<boolean>
sql<string[]>
])
how can i create a helper function in order to reuse it ?
.select([
'e.id',
eventStartDate('e'),
eventEndDate('e'),
'e.title',
'e.type',
'e.status',
'e.banner',
'e.event_end_date as end_date',
'e.location',
'e.duration_in_minute',
'e.participant_count_limit',
'e.registration_date_limit',
'e.provider',
coordinates('e'),
sql<boolean>
is_full_of_participants(e).as('isFullOfParticipants'),sql<string[]>
get_event_sports(e.id).as('sports'),])
how can i create a helper function in order to reuse it ?