Respect / Respect/Relational

Is there a way to select columns without Sql:: and database views?

Open
#82 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
PHP
Stars
237
Forks
32
PR merge metrics
No merged PRs in 30d

Description

Hello,
Each time I need to reduce overhead related to too many unneeded columns I've to create a database view and fetch from this view. The question is: is there a way to set output columns?

I tried this ( from issue #24):

    $mapper->bill_notice_list = c\Filtered::by('description', 'next_notification_date')->bill_notice();
    $billNotices = $mapper->bill_notice_list(
        array('usercustomer_id' => $usercustomerId)
    )->fetchAll();

but no data retrieved.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reviewing the filtered column-selection example in the issue and the existing query and fetch behavior it describes. Determine whether selecting output columns is supported and what should happen when the attempted expression returns no data; done means a documented, working way to retrieve only the requested columns.

Written by the indexing model from the issue text.

Assessment

Tech stack
php
Domain
database
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.