Giter Club home page Giter Club logo

Comments (4)

lichtner avatar lichtner commented on May 26, 2024

@beaudesigns I know we talk about it already, but this still don't like me...

what do you think about it? I still thinking about add alias insert() === insertInto() and also this ...

Actual implementation is more strict, but this is more natural.

from fluentpdo.

beauwest avatar beauwest commented on May 26, 2024

I agree that having ->delete() & ->deleteFrom() might be confusing, it would be better to simplify it down to 1 that handles everything.

I personally think ->deleteFrom() and ->insertInto() are more natural, but that's because I'm familiar with SQL, and that's how I would write it in SQL.

But for Fluent, I think using ->delete('table')->where('id', 1); makes sense as well. My only concern is that it reads like you are deleting the table, not deleting FROM the table.

from fluentpdo.

lichtner avatar lichtner commented on May 26, 2024

Ok, let both version. but this DELETE t WHERE .... is not valid MySql syntax. In MySQL is used DROP for delete table, in postgre not?

I suggest let delete and deleteFrom but if somebody use delete without from then will be translated to DELETE FROM table. Do you agree?

from fluentpdo.

beauwest avatar beauwest commented on May 26, 2024

Yes, either it should be translated to DELETE FROM TABLE, or an error thrown when it is tried to run without FROM.

from fluentpdo.

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.