Git Product home page Git Product logo

phpsql's People

Contributors

addiks avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

phpsql's Issues

Implement transactions

Currently there are no transactions. Trying to start a transaction will result in an error.

It should be possible to start, commit and rollback transactions using the statements 'START TRANSACTION', 'COMMIT' and 'ROLLBACK'.

Implementation plan: I think the easiest way to implement transactions is using a proxied filesystem that saves all changes in a seperate (inmemory) file and only applies these changes on a commit. Read actions on a file with uncommitted changes has to be managed correctly.

Data versions

The structure of the data stored on the file-system can change with every version. Currently every structure-change can (and in most cases will) make the already stored files incompatible.

The structure of the stored files should be versioned, every version should be readable (by the latest phpsql-version) and migrations to higher versions should be possible.

Implement views

Implement views. Most of that should already be there. Just connect the dots.

Table requires a primary key

There is a hard requirement in CreateTableStatement.php:checkPlausibility() for tables to have a primary key- however this is not a SQL requirement. The library incorrectly adds a primary key to the first column in the table which breaks when that column does not contain unique values.

Correct locking.

Currently there is no locking at all. For in-memory databases (without threads) this is not a problem, but it will become a problem when the database is saved on the actual filesystem.

There must be a way to lock tables or rows.

Implementation plan: While the table- and column-data- implementations work with the actual files, the executors use abstract data-providers (filters, orderers, ...) that themself use arbitrarely deep nested the actual implementations. That means we need an Interface (LockableInterface) that indicates that this data-provider can be locked. The column-data/table/schema implementations will do actual locking and the other data-providers will just forward the lock-operations. Maybe have the actual locking done by a seperate class of components (Lockers?) that can depending on the implementation either just use the 'flock' functions or use more complex semaphores.

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.