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
53eabd3d
Commit
53eabd3d
authored
Apr 12, 2007
by
meus
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed windows newlines ^M and removed <br /> tags. They should not be used in
the docs.
parent
16e42966
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
80 additions
and
88 deletions
+80
-88
Getting started - Compiling.php
manual/docs/Getting started - Compiling.php
+6
-15
Getting started - Installation - Include and autoload.php
...Getting started - Installation - Include and autoload.php
+3
-3
Getting started - Starting new project.php
manual/docs/Getting started - Starting new project.php
+5
-5
Object relational mapping - Columns - Data types - Blob.php
...ject relational mapping - Columns - Data types - Blob.php
+10
-10
Object relational mapping - Columns - Data types - Clob.php
...ject relational mapping - Columns - Data types - Clob.php
+14
-13
Object relational mapping - Columns - Data types - Integer.php
...t relational mapping - Columns - Data types - Integer.php
+13
-13
Object relational mapping - Columns - Data types - String.php
...ct relational mapping - Columns - Data types - String.php
+15
-15
Object relational mapping - Columns - Data types - Time.php
...ject relational mapping - Columns - Data types - Time.php
+14
-14
No files found.
manual/docs/Getting started - Compiling.php
View file @
53eabd3d
<p>
Compiling is a method for making a single file of most used doctrine runtime components
including the compiled file instead of multiple files (in worst cases dozens of files)
can improve performance by an order of magnitude.
</p>
<p>
In cases where this might fail, a Doctrine_Exception is throw detailing the error.
</p>
Compiling
is
a
method
for
making
a
single
file
of
most
used
doctrine
runtime
components
including
the
compiled
file
instead
of
multiple
files
(
in
worst
cases
dozens
of
files
)
can
improve
performance
by
an
order
of
magnitude
.
In
cases
where
this
might
fail
,
a
Doctrine_Exception
is
throw
detailing
the
error
.
<code
type=
"php"
>
Doctrine::compile();
// on some other script:
require_once("path_to_doctrine/Doctrine.compiled.php");
</code>
<
code
type
=
'php'
>
Doctrine
::
compile
();
// on some other script:
require_once
(
'path_to_doctrine/Doctrine.compiled.php'
);
</
code
>
manual/docs/Getting started - Installation - Include and autoload.php
View file @
53eabd3d
In
order
to
use
Doctrine
in
your
project
it
must
first
be
included
.
<
code
type
=
"php"
>
require_once
(
"path-to-doctrine/lib/Doctrine.php"
);
<
code
type
=
'php'
>
require_once
(
'path-to-doctrine/lib/Doctrine.php'
);
</
code
>
Doctrine
support
[
http
://
www
.
php
.
net
/
autoload
Autoloading
]
for
including
files
so
that
you
do
not
have
to
include
anything
more
then
the
base
file
.
There
are
two
different
strategies
that
can
be
used
to
do
this
:
If
you
do
use
the
**
__autoload
**
function
for
your
own
logic
you
can
use
it
.
<
code
type
=
"php"
>
<
code
type
=
'php'
>
function
__autoload
(
$class
)
{
Doctrine
::
autoload
(
$class
);
}
...
...
manual/docs/Getting started - Starting new project.php
View file @
53eabd3d
...
...
@@ -8,7 +8,7 @@ An short example:
We want to create a database table called '
user
' with columns id(primary key), name, username, password and created. Provided that you have already installed Doctrine these few lines of code are all you need:
<code type=
"php"
>
<code type=
'
php
'
>
require_once('
lib
/
Doctrine
.
php
');
spl_autoload_register(array('
Doctrine
', '
autoload
'));
...
...
@@ -18,10 +18,10 @@ class User extends Doctrine_Record {
// set '
user
' table columns, note that
// id column is always auto-created
$this
->
hasColumn
(
"name"
,
"string"
,
30
);
$this
->
hasColumn
(
"username"
,
"string"
,
20
);
$this
->
hasColumn
(
"password"
,
"string"
,
16
);
$this
->
hasColumn
(
"created"
,
"integer"
,
11
);
$this->hasColumn(
'
name
','
string
'
,30);
$this->hasColumn(
'
username
','
string
'
,20);
$this->hasColumn(
'
password
','
string
'
,16);
$this->hasColumn(
'
created
','
integer
'
,
11
);
}
}
</
code
>
...
...
manual/docs/Object relational mapping - Columns - Data types - Blob.php
View file @
53eabd3d
Blob
(
Binary
Large
OBject
)
data
type
is
meant
to
store
data
of
undefined
length
that
may
be
too
large
to
store
in
text
fields
,
like
data
that
is
usually
stored
in
files
.
<
br
\
><
br
\
>
Blob
fields
are
usually
not
meant
to
be
used
as
parameters
of
query
search
clause
(
WHERE
)
unless
the
underlying
DBMS
supports
a
feature
usually
known
as
"full text search"
Blob
(
Binary
Large
OBject
)
data
type
is
meant
to
store
data
of
undefined
length
that
may
be
too
large
to
store
in
text
fields
,
like
data
that
is
usually
stored
in
files
.
<
code
type
=
"php"
>
class
Test
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'blobtest'
,
'blob'
);
}
}
</
code
>
Blob
fields
are
usually
not
meant
to
be
used
as
parameters
of
query
search
clause
(
WHERE
)
unless
the
underlying
DBMS
supports
a
feature
usually
known
as
"full text search"
<
code
type
=
"php"
>
class
Test
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'blobtest'
,
'blob'
);
}
}
</
code
>
manual/docs/Object relational mapping - Columns - Data types - Clob.php
View file @
53eabd3d
Clob
(
Character
Large
OBject
)
data
type
is
meant
to
store
data
of
undefined
length
that
may
be
too
large
to
store
in
text
fields
,
like
data
that
is
usually
stored
in
files
.
<
br
\
><
br
\
>
Clob
fields
are
meant
to
store
only
data
made
of
printable
ASCII
characters
whereas
blob
fields
are
meant
to
store
all
types
of
data
.
<
br
\
><
br
\
>
Clob
fields
are
usually
not
meant
to
be
used
as
parameters
of
query
search
clause
(
WHERE
)
unless
the
underlying
DBMS
supports
a
feature
usually
known
as
"full text search"
<
code
type
=
"php"
>
class
Test
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'clobtest'
,
'clob'
);
}
}
</
code
>
Clob
(
Character
Large
OBject
)
data
type
is
meant
to
store
data
of
undefined
length
that
may
be
too
large
to
store
in
text
fields
,
like
data
that
is
usually
stored
in
files
.
Clob
fields
are
meant
to
store
only
data
made
of
printable
ASCII
characters
whereas
blob
fields
are
meant
to
store
all
types
of
data
.
Clob
fields
are
usually
not
meant
to
be
used
as
parameters
of
query
search
clause
(
WHERE
)
unless
the
underlying
DBMS
supports
a
feature
usually
known
as
"full text search"
<
code
type
=
"php"
>
class
Test
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'clobtest'
,
'clob'
);
}
}
</
code
>
manual/docs/Object relational mapping - Columns - Data types - Integer.php
View file @
53eabd3d
The
integer
type
is
the
same
as
integer
type
in
PHP
.
It
may
store
integer
values
as
large
as
each
DBMS
may
handle
.
<
br
\
><
br
\
>
Fields
of
this
type
may
be
created
optionally
as
unsigned
integers
but
not
all
DBMS
support
it
.
Therefore
,
such
option
may
be
ignored
.
Truly
portable
applications
should
not
rely
on
the
availability
of
this
option
.
<
br
\
><
br
\
>
The
integer
type
maps
to
different
database
type
depending
on
the
column
length
.
The
integer
type
is
the
same
as
integer
type
in
PHP
.
It
may
store
integer
values
as
large
as
each
DBMS
may
handle
.
<
code
type
=
"php"
>
class
Test
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'integertest'
,
'integer'
,
4
,
array
(
'unsigned'
=>
true
));
}
}
</
code
>
Fields
of
this
type
may
be
created
optionally
as
unsigned
integers
but
not
all
DBMS
support
it
.
Therefore
,
such
option
may
be
ignored
.
Truly
portable
applications
should
not
rely
on
the
availability
of
this
option
.
The
integer
type
maps
to
different
database
type
depending
on
the
column
length
.
<
code
type
=
"php"
>
class
Test
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'integertest'
,
'integer'
,
4
,
array
(
'unsigned'
=>
true
));
}
}
</
code
>
manual/docs/Object relational mapping - Columns - Data types - String.php
View file @
53eabd3d
The
text
data
type
is
available
with
two
options
for
the
length
:
one
that
is
explicitly
length
limited
and
another
of
undefined
length
that
should
be
as
large
as
the
database
allows
.
<
br
\
><
br
\
>
The
length
limited
option
is
the
most
recommended
for
efficiency
reasons
.
The
undefined
length
option
allows
very
large
fields
but
may
prevent
the
use
of
indexes
,
nullability
and
may
not
allow
sorting
on
fields
of
its
type
.
<
br
\
><
br
\
>
The
fields
of
this
type
should
be
able
to
handle
8
bit
characters
.
Drivers
take
care
of
DBMS
specific
escaping
of
characters
of
special
meaning
with
the
values
of
the
strings
to
be
converted
to
this
type
.
<
br
\
><
br
\
>
By
default
Doctrine
will
use
variable
length
character
types
.
If
fixed
length
types
should
be
used
can
be
controlled
via
the
fixed
modifier
.
<
code
type
=
"php"
>
class
Test
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'stringtest'
,
'string'
,
200
,
array
(
'fixed'
=>
true
));
}
}
</
code
>
The
text
data
type
is
available
with
two
options
for
the
length
:
one
that
is
explicitly
length
limited
and
another
of
undefined
length
that
should
be
as
large
as
the
database
allows
.
The
length
limited
option
is
the
most
recommended
for
efficiency
reasons
.
The
undefined
length
option
allows
very
large
fields
but
may
prevent
the
use
of
indexes
,
nullability
and
may
not
allow
sorting
on
fields
of
its
type
.
The
fields
of
this
type
should
be
able
to
handle
8
bit
characters
.
Drivers
take
care
of
DBMS
specific
escaping
of
characters
of
special
meaning
with
the
values
of
the
strings
to
be
converted
to
this
type
.
By
default
Doctrine
will
use
variable
length
character
types
.
If
fixed
length
types
should
be
used
can
be
controlled
via
the
fixed
modifier
.
<
code
type
=
'php'
>
class
Test
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'stringtest'
,
'string'
,
200
,
array
(
'fixed'
=>
true
));
}
}
</
code
>
manual/docs/Object relational mapping - Columns - Data types - Time.php
View file @
53eabd3d
The
time
data
type
may
represent
the
time
of
a
given
moment
of
the
day
.
DBMS
independent
representation
of
the
time
of
the
day
is
also
accomplished
by
using
text
strings
formatted
according
to
the
ISO
-
8601
standard
.
<
br
\
><
br
\
>
The
format
defined
by
the
ISO
-
8601
standard
for
the
time
of
the
day
is
HH
:
MI
:
SS
where
HH
is
the
number
of
hour
the
day
from
00
to
23
and
MI
and
SS
are
respectively
the
number
of
the
minute
and
of
the
second
from
00
to
59.
Hours
,
minutes
and
seconds
numbered
below
10
should
be
padded
on
the
left
with
0.
<
br
\
><
br
\
>
Some
DBMS
have
native
support
for
time
of
the
day
formats
,
but
for
others
the
DBMS
driver
may
have
to
represent
them
as
integers
or
text
values
.
In
any
case
,
it
is
always
possible
to
make
comparisons
between
time
values
as
well
sort
query
results
by
fields
of
this
type
.
<
code
type
=
"php"
>
class
Test
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'timetest'
,
'time'
);
}
}
</
code
>
The
time
data
type
may
represent
the
time
of
a
given
moment
of
the
day
.
DBMS
independent
representation
of
the
time
of
the
day
is
also
accomplished
by
using
text
strings
formatted
according
to
the
ISO
-
8601
standard
.
The
format
defined
by
the
ISO
-
8601
standard
for
the
time
of
the
day
is
HH
:
MI
:
SS
where
HH
is
the
number
of
hour
the
day
from
00
to
23
and
MI
and
SS
are
respectively
the
number
of
the
minute
and
of
the
second
from
00
to
59.
Hours
,
minutes
and
seconds
numbered
below
10
should
be
padded
on
the
left
with
0.
Some
DBMS
have
native
support
for
time
of
the
day
formats
,
but
for
others
the
DBMS
driver
may
have
to
represent
them
as
integers
or
text
values
.
In
any
case
,
it
is
always
possible
to
make
comparisons
between
time
values
as
well
sort
query
results
by
fields
of
this
type
.
<
code
type
=
"php"
>
class
Test
extends
Doctrine_Record
{
public
function
setTableDefinition
()
{
$this
->
hasColumn
(
'timetest'
,
'time'
);
}
}
</
code
>
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