GithubHelp home page GithubHelp logo

Comments (7)

romaninsh avatar romaninsh commented on July 17, 2024

This has been the limitation with original DSQL too. If you FROM another query/expression you can only have one source.

I am not sure if SQL vendors are happy about having multiple dynamic data sources and joining them together, but if it's a working case, we can implement multi-expression source support through PR.

from dsql.

DarkSide666 avatar DarkSide666 commented on July 17, 2024

That's why I proposed to always save tables in $this->args['table'][$table_alias] = $table structured array.

from dsql.

romaninsh avatar romaninsh commented on July 17, 2024

I agree, but it's low priority for us. It will not impact the interface either, so we can implement this later.

Also if table() uses expression without alias, it's still a valid format, in which case we could probably use ['table'][0]

from dsql.

DarkSide666 avatar DarkSide666 commented on July 17, 2024

yes it's valid format while you have only one table, but can lead to strange and hard to track SQL issues.

I'm ready to implement this sometime soon, just don't close this issue ;)

from dsql.

DarkSide666 avatar DarkSide666 commented on July 17, 2024

MySQL will throw exception if we use sub-query as table without alias:
SQLSTATE[42000]: Syntax error or access violation: 1248 Every derived table must have its own alias

from dsql.

DarkSide666 avatar DarkSide666 commented on July 17, 2024

Fixed here: #64

from dsql.

DarkSide666 avatar DarkSide666 commented on July 17, 2024

implemented here: 1a29ef2

from dsql.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.