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
81a21344
Commit
81a21344
authored
Feb 10, 2007
by
zYne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
--no commit message
--no commit message
parent
1f27c65b
Changes
5
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
198 additions
and
26 deletions
+198
-26
Connection.php
lib/Doctrine/Connection.php
+1
-11
Export.php
lib/Doctrine/Export.php
+173
-8
Import.php
lib/Doctrine/Import.php
+17
-0
Mssql.php
lib/Doctrine/Import/Mssql.php
+5
-5
Record.php
lib/Doctrine/Record.php
+2
-2
No files found.
lib/Doctrine/Connection.php
View file @
81a21344
...
...
@@ -463,17 +463,6 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
return
true
;
}
/**
* returns the next value in the given sequence
*
* @param string $sequence
* @throws PDOException if something went wrong at database level
* @return integer
*/
public
function
nextId
(
$sequence
)
{
throw
new
Doctrine_Connection_Exception
(
'NextId() for sequences not supported by this driver.'
);
}
/**
* Set the charset on the current connection
*
...
...
@@ -483,6 +472,7 @@ abstract class Doctrine_Connection extends Doctrine_Configurable implements Coun
*/
public
function
setCharset
(
$charset
)
{
}
/**
* Set the date/time format for the current connection
...
...
lib/Doctrine/Export.php
View file @
81a21344
This diff is collapsed.
Click to expand it.
lib/Doctrine/Import.php
View file @
81a21344
...
...
@@ -174,4 +174,21 @@ class Doctrine_Import extends Doctrine_Connection_Module
return
$this
->
conn
->
fetchColumn
(
$this
->
sql
[
'listViews'
]);
}
/**
* import
*
* method for importing existing schema to Doctrine_Record classes
*
* @param string $directory
* @param array $databases
*/
public
function
import
(
$directory
,
array
$databases
=
array
())
{
$builder
=
new
Doctrine_Import_Builder
();
$builder
->
setTargetPath
(
$directory
);
foreach
(
$this
->
listTables
()
as
$table
)
{
$builder
->
buildRecord
(
$table
,
$this
->
listTableColumns
(
$table
));
}
}
}
lib/Doctrine/Import/Mssql.php
View file @
81a21344
...
...
@@ -73,15 +73,15 @@ class Doctrine_Import_Mssql extends Doctrine_Import
$decl
=
$this
->
conn
->
dataDict
->
getPortableDeclaration
(
$val
);
$description
=
array
(
'name'
=>
$val
[
'column_name'
],
'type'
=>
$type
,
'name'
=>
$val
[
'column_name'
],
'type'
=>
$type
,
'ptype'
=>
$decl
[
'type'
],
'length'
=>
$decl
[
'length'
],
'fixed'
=>
$decl
[
'fixed'
],
'unsigned'
=>
$decl
[
'unsigned'
],
'notnull'
=>
(
bool
)
(
$val
[
'is_nullable'
]
===
'NO'
),
'default'
=>
$val
[
'column_def'
],
'primary'
=>
(
strtolower
(
$identity
)
==
'identity'
),
'notnull'
=>
(
bool
)
(
$val
[
'is_nullable'
]
===
'NO'
),
'default'
=>
$val
[
'column_def'
],
'primary'
=>
(
strtolower
(
$identity
)
==
'identity'
),
);
$columns
[
$val
[
'column_name'
]]
=
$description
;
}
...
...
lib/Doctrine/Record.php
View file @
81a21344
...
...
@@ -1067,8 +1067,8 @@ abstract class Doctrine_Record extends Doctrine_Access implements Countable, Ite
$a
[
$v
]
=
$this
->
_data
[
$v
];
}
}
foreach
(
$
this
->
_table
->
inheritanceM
ap
as
$k
=>
$v
)
{
$map
=
$this
->
_table
->
inheritanceMap
;
foreach
(
$
m
ap
as
$k
=>
$v
)
{
$old
=
$this
->
get
(
$k
,
false
);
if
((
string
)
$old
!==
(
string
)
$v
||
$old
===
null
)
{
...
...
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