Comments (8)
@harikt @pmjones please can you take look at this?
from aura.sql.
Hi @php- ,
I am wondering how you are using @@session.time_zone
. Is this a field ? Can you show exact issue on a Pull request how you are using the feature.
I can't promise I will fix it, but I can look into it.
from aura.sql.
For example: convert_tz(field, @@session.time_zone, to_desired_timezone)
, and this does not matter you use in selection or in where clause.
There are many different cases as I mentioned before like COUNT(DISTINCT field))
, I think you should add config to enable/disable it. because they way it works, is really limiting some good features of SQL language.
Thanks
from aura.sql.
Hi @php-
It would be nice if you provide minimal,ย self-contained, reproducing test case that shows the problem you are reporting.
from aura.sql.
Hi @php- ,
I believe you can enable / disable it via setting the parser to NullParser
.
// https://github.com/auraphp/Aura.Sql/tree/2be02d5dfd9fdee6df199de1a19572aa490bb744/src/Parser
$parser = new \Aura\Sql\Parser\NullParser();
$pdo->setParser($parser);
Remember once you unset to new parser you may want to set it again if you want to make sure other quoting related functionalities is working fine.
Hope that helps to resolve your issue / use case .
from aura.sql.
Is this still relevant? It seems to work fine now for me ๐ค
from aura.sql.
@francislavoie yes, issue still exists. The query you run might not have issues, but when you use builder like:
$query = $queryFactory->newSelect();
$query->from("customer");
$query->cols(['convert_tz(open_from, customer.time_zone, @@session.time_zone) open_now']);
$query->where('customer.id=123');
from aura.sql.
@francislavoie yes, issue still exists. The query you run might not have issues, but when you use builder like:
$query = $queryFactory->newSelect();
$query->from("customer");
$query->cols(['convert_tz(open_from, customer.time_zone, @@session.time_zone) open_now']);
$query->where('customer.id=123');
Sorry, but your code example has no reference to aura/sql
. There is no query builder in this package.
from aura.sql.
Related Issues (20)
- Bug with pgsql query HOT 5
- DB Reconnection HOT 5
- Decode json? (to arrays) HOT 1
- Bug in Queryparser for SQLite HOT 3
- Question HOT 1
- Using 2.x and 3.x in parallel HOT 10
- What is the future of this project? HOT 15
- Create GIthub Actions to automatically build and test this package
- PHP 8.1 Compatibility HOT 8
- Type hint incomplete HOT 7
- Scrutinizer Error HOT 1
- Version that doesn't throw deprecation warnings in 8.1 but works in 8.0? HOT 19
- Works with all versions of PHP from 5.6 to 8.1
- Release note HOT 7
- Abandon 4.x ? HOT 2
- Consider tagging / releasing 3.0.1 please ? HOT 2
- How to debug "Column count doesn't match value count"? HOT 1
- Time for 5.0.2/5.1 HOT 4
- Does Aura.Sql suffer of the problem of useless order by on some ORM prefetches ? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aura.sql.