AsyncCollection.pluck returns undefined values #17

Open
opened 2022-04-29 01:13:14 +00:00 by garrettmills · 0 comments
Owner

Calling .pluck('identifier') on the query below results in a collection of undefined values, even though the fields exist on the results:

await this.builder()
            .connection('default')
            .select('identifier')
            .from('migrations')
            .whereIn('identifier', identifiers)
            .get()
            .pluck<string>('identifier')

In contrast, collecting the results to a normal Collection works fine:

(await this.builder()
            .connection('default')
            .select('identifier')
            .from('migrations')
            .whereIn('identifier', identifiers)
            .get()
            .collect())
            .pluck<string>('identifier')
Calling `.pluck('identifier')` on the query below results in a collection of `undefined` values, even though the fields exist on the results: ```ts await this.builder() .connection('default') .select('identifier') .from('migrations') .whereIn('identifier', identifiers) .get() .pluck<string>('identifier') ``` In contrast, collecting the results to a normal Collection works fine: ```ts (await this.builder() .connection('default') .select('identifier') .from('migrations') .whereIn('identifier', identifiers) .get() .collect()) .pluck<string>('identifier') ```
Sign in to join this conversation.
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: extollo/lib#17
No description provided.