Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
0813509b
Commit
0813509b
authored
Jul 11, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
1b9dcfb4
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
59 deletions
+31
-59
architecture.txt
manual/new/docs/en/technology/architecture.txt
+31
-1
internal-optimizations.txt
manual/new/docs/en/technology/internal-optimizations.txt
+0
-58
No files found.
manual/new/docs/en/technology/architecture.txt
View file @
0813509b
...
...
@@ -4,9 +4,39 @@ Doctrine is divided into 3 main packages:
* Doctrine
* Doctrine_Manager
* Doctrine_Connection
* Doctrine_Compiler
* Doctrine_Exception
* Doctrine_Formatter
* Doctrine_Object
* Doctrine_Null
* Doctrine_Event
* Doctrine_Overloadable
* Doctrine_Configurable
* Doctrine_EventListener
* Doctrine DBAL
* Doctrine_Expression
* Doctrine_Expression
_Driver
* Doctrine_Export
* Doctrine_Import
* Doctrine_Sequence
* Doctrine_Transaction
* Doctrine_DataDict
Doctrine DBAL is also divided into driver packages.
* Doctrine ORM
* Doctrine_Record
* Doctrine_Table
* Doctrine_Relation
* Doctrine_Expression
* Doctrine_Query
* Doctrine_RawSql
* Doctrine_Collection
* Doctrine_Tokenizer
There are also plugins for Doctrine:
* Doctrine_Validator
* Doctrine_Hook
* Doctrine_View
* Doctrine_Tree + Doctrine_Node
manual/new/docs/en/technology/internal-optimizations.txt
View file @
0813509b
+++ DELETE
<code type="php">
/**
* lets presume $users contains a collection of users
* each having 0-1 email and 0-* phonenumbers
*/
$users->delete();
/**
* On connection drivers other than mysql doctrine would now perform three queries
* regardless of how many users, emails and phonenumbers there are
*
* the queries would look something like:
* DELETE FROM entity WHERE entity.id IN (1,2,3, ... ,15)
* DELETE FROM phonenumber WHERE phonenumber.id IN (4,6,7,8)
* DELETE FROM email WHERE email.id IN (1,2, ... ,10)
*
* On mysql doctrine is EVEN SMARTER! Now it would perform only one query!
* the query would look like:
* DELETE entity, email, phonenumber FROM entity
* LEFT JOIN phonenumber ON entity.id = phonenumber.entity_id, email
* WHERE (entity.email_id = email.id) && (entity.id IN(4, 5, 6, 7, 8, 9, 10, 11)) && (entity.type = 0)
*/
</code>
+++ INSERT
<code type="php">
// lets presume $users contains a collection of new users
// each having 0-1 email and 0-* phonenumbers
$users->save();
/**
* now doctrine would perform prepared queries in the following order:
*
* first the emails since every user needs to get the primary key of their newly created email
* INSERT INTO email (address) VALUES (:address)
* INSERT INTO email (address) VALUES (:address)
* INSERT INTO email (address) VALUES (:address)
*
* then the users
* INSERT INTO entity (name,email_id) VALUES (:name,:email_id)
* INSERT INTO entity (name,email_id) VALUES (:name,:email_id)
* INSERT INTO entity (name,email_id) VALUES (:name,:email_id)
*
* and at last the phonenumbers since they need the primary keys of the newly created users
* INSERT INTO phonenumber (phonenumber,entity_id) VALUES (:phonenumber,:entity_id)
* INSERT INTO phonenumber (phonenumber,entity_id) VALUES (:phonenumber,:entity_id)
* INSERT INTO phonenumber (phonenumber,entity_id) VALUES (:phonenumber,:entity_id)
* INSERT INTO phonenumber (phonenumber,entity_id) VALUES (:phonenumber,:entity_id)
* INSERT INTO phonenumber (phonenumber,entity_id) VALUES (:phonenumber,:entity_id)
*
* These operations are considerably fast, since many databases perform multiple
* prepared queries very rapidly
*/
</code>
+++ UPDATE
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment