This PR's purpose is to allow expanded select to accept multiline inputs. (currently any multiline expanded select compiles a wrong SQL query)
Expanded select is a great feature for small queries, but for big ones it quickly became complicated to read the query.
For example, the following Query :
var q = new Query().From("users").Select("users.{id,name, age, password, description, admin, last_update, company, title, addr1 as AddressNumber, addr2 as AddressStreet, addr3 as AddressPostalCode, addr4 as AddressCountry, dept, /* other fields */ }");
is much more readable this way :
var q = new Query().From("users").Select(@"users.{
id, name, age, password, description, //allow multiple parameters on the same line
admin, last_update, //allow multiple lines
company, title, dept,
addr1 as AddressNumber, addr2 as AddressStreet, //allow "as" syntax
addr3 as AddressPostalCode, addr4 as AddressCountry,
/* other fields */
}");
👇 Click on the image for a new way to code review
####
[![Review these changes using an interactive CodeSee Map](https://s3.us-east-2.amazonaws.com/maps.codesee.io/images/github/sqlkata/querybuilder/689/9a0f9836/713a973efef2c10813544b94a2bb4d28fa7c1909.svg)](https://app.codesee.io/r/reviews?pr=689&src=https%3A%2F%2Fgithub.com%2Fsqlkata%2Fquerybuilder)
#### Legend
Hi,
This PR's purpose is to allow expanded select to accept multiline inputs. (currently any multiline expanded select compiles a wrong SQL query) Expanded select is a great feature for small queries, but for big ones it quickly became complicated to read the query. For example, the following Query :
is much more readable this way :
Regards,
Romain.