Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

column names alias #5

Closed
mburahmeh opened this issue Aug 29, 2019 · 1 comment
Closed

column names alias #5

mburahmeh opened this issue Aug 29, 2019 · 1 comment
Assignees

Comments

@mburahmeh
Copy link

mburahmeh commented Aug 29, 2019

Hi

You can use "as" for aliasing a column name just like sql. Here is an example -

select Customers.CustomerName as name, Customers.ContactName as cName, Customers.CustomerID as cId from Orders join Customers 
on 
Orders.CustomerID=Customers.CustomerID

Originally posted by @ujjwalguptaofficial in #3 (comment)

aliasing is working fine but the returned query still contains all columns plus the alias column , what i need is how to select aliasing columns only without other columns

@ujjwalguptaofficial ujjwalguptaofficial self-assigned this Sep 1, 2019
@ujjwalguptaofficial
Copy link
Owner

IndexedDb is NoSQL database means your whole data is stored as object & thus retrieved as object. JsStore dont filter columns because it will be extra computation.

We recommend to use what you need from the results & don't care about extra data. The data is stored locally, so its not much of issue unlike server side database.

e.g - if result is something like that -

var result = [{
    id: 1,
    name: 'ujjwal gupta',
    address: 'india',
    gender: 'male'
}]

From this result - i need only name & gender. So i will use only name & gender don't care about extra data.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants