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
bc3c8c2e
Commit
bc3c8c2e
authored
Aug 08, 2006
by
doctrine
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Docs updated
parent
eb0eb44d
Changes
7
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
42 additions
and
1 deletion
+42
-1
Doctrine.php
Doctrine.php
+2
-0
Basic Components - RawSql - Adding components.php
...l/codes/Basic Components - RawSql - Adding components.php
+13
-0
Getting started - Record identifiers - Autoincremented.php
...etting started - Record identifiers - Autoincremented.php
+7
-0
Getting started - Record identifiers - Introduction.php
...s/Getting started - Record identifiers - Introduction.php
+4
-0
AccessTestCase.php
tests/AccessTestCase.php
+4
-0
BatchIteratorTestCase.php
tests/BatchIteratorTestCase.php
+6
-0
UnitTestCase.php
tests/UnitTestCase.php
+6
-1
No files found.
Doctrine.php
View file @
bc3c8c2e
...
...
@@ -381,6 +381,8 @@ final class Doctrine {
$fp
=
fopen
(
self
::
$path
.
DIRECTORY_SEPARATOR
.
'Doctrine.compiled.php'
,
'w+'
);
fwrite
(
$fp
,
"<?php
"
.
implode
(
''
,
$ret
)
.
"
class InvalidKeyException extends Exception { }
class DQLException extends Exception { }
?>"
);
fclose
(
$fp
);
}
...
...
manual/codes/Basic Components - RawSql - Adding components.php
0 → 100644
View file @
bc3c8c2e
<?php
$query
=
new
Doctrine_RawSql
(
$session
);
$query
->
parseQuery
(
"SELECT
{
entity.*
}
,
{
phonenumber.*
}
FROM entity
LEFT JOIN phonenumber
ON phonenumber.entity_id = entity.id"
);
$query
->
addComponent
(
"entity"
,
"Entity"
);
$query
->
addComponent
(
"phonenumber"
,
"Phonenumber"
);
$entities
=
$query
->
execute
();
?>
manual/codes/Getting started - Record identifiers - Autoincremented.php
0 → 100644
View file @
bc3c8c2e
<?php
class
User
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
"uid"
,
"integer"
,
20
,
"primary|autoincrement"
);
}
}
?>
manual/docs/Getting started - Record identifiers - Introduction.php
0 → 100644
View file @
bc3c8c2e
Doctrine
supports
many
kind
of
identifiers
.
For
most
cases
it
is
recommended
not
to
specify
any
primary
keys
(
Doctrine
will
then
use
field
name
'id'
as
an
autoincremented
primary
key
)
.
When
using
table
creation
Doctrine
is
smart
enough
to
emulate
the
autoincrementation
with
sequences
and
triggers
on
databases
that
doesn
'
t
support
it
natively
.
tests/AccessTestCase.php
View file @
bc3c8c2e
<?php
class
Doctrine_AccessTestCase
extends
Doctrine_UnitTestCase
{
public
function
prepareData
()
{
}
public
function
prepareTables
()
{
$this
->
tables
=
array
(
"Entity"
,
"User"
);
parent
::
prepareTables
();
}
public
function
testOffsetMethods
()
{
$user
=
new
User
();
$this
->
assertEqual
(
$user
[
"name"
],
null
);
...
...
tests/BatchIteratorTestCase.php
View file @
bc3c8c2e
...
...
@@ -2,6 +2,12 @@
require_once
(
"UnitTestCase.php"
);
class
Doctrine_BatchIteratorTestCase
extends
Doctrine_UnitTestCase
{
public
function
prepareTables
()
{
$this
->
tables
=
array
(
"Entity"
,
"User"
,
"Group"
,
"Address"
,
"Phonenumber"
);
parent
::
prepareTables
();
}
public
function
testIterator
()
{
$graph
=
new
Doctrine_Query
(
$this
->
session
);
$entities
=
$graph
->
query
(
"FROM Entity"
);
...
...
tests/UnitTestCase.php
View file @
bc3c8c2e
<?php
require_once
(
"../Doctrine.compiled.php"
);
require_once
(
"../Doctrine.php"
);
Doctrine
::
compile
();
//require_once("../Doctrine.compiled.php");
//Doctrine::loadAll();
function
__autoload
(
$class
)
{
...
...
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