GithubHelp home page GithubHelp logo

Comments (3)

adambanaszkiewicz avatar adambanaszkiewicz commented on July 24, 2024

Hi,

Wow, I've just create this repo few hours ago :)

This is, because:

  1. Start transaction and commit it - waiting for some of exceptions.
  2. If transation od DB fails, PDO throws own exceptions which is cought by code and rolled back.
  3. If transaction ends succesfully, app throws own error and do nothing else.

This give me ability to create little more extensible code, without ifs, additionally variables etc. It looks little wierd but it works fine :)

This is really alpha version. I tests only few percent of code. In next days/weeks I write rest of the tests, but for now, some of the functions can mess up. As You can see, even documentation isn't written. I'll be really happy if You use my code in Your project and write me some callback about it :)

Actually I write this QueryBuilder for the same reason - I need standalone QB for my project, and none of that I've found is good enough for me. There is some work with this repo, but basic functionality is implemented.

Best.

from query-builder.

nrwiersma avatar nrwiersma commented on July 24, 2024

Hey,

Like i said, always look for something like this :)

Surely your successful case can return normally, and any errors, or rollback for that matter, can throw an exception. It is a bit of code smell that success throws an exception. This is however pure opinion.

Looking into how I can integrate today and tomorrow, and will see how it goes. Will let you know what I find.

Later.

from query-builder.

adambanaszkiewicz avatar adambanaszkiewicz commented on July 24, 2024

Yes, You have right. I think I need to rewrite this thing.

Thank You for Your opinion.

About integration please see the TestCase.php file, and see how You can push PDO connection object to QueryBuilder to use current connection with this repo:

https://github.com/requtize/query-builder/blob/master/tests/unit/TestCase.php#L35

from query-builder.

Related Issues (6)

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.