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
1b0e2e50
Commit
1b0e2e50
authored
May 31, 2010
by
Juozas Kaziukenas
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed fetch() and default column values retrieval
Signed-off-by:
Juozas Kaziukenas
<
juozas@juokaz.com
>
parent
347d8d13
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
3 deletions
+16
-3
SqlsrvStatement.php
lib/Doctrine/DBAL/Driver/Sqlsrv/SqlsrvStatement.php
+7
-1
MsSqlSchemaManager.php
lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php
+9
-2
No files found.
lib/Doctrine/DBAL/Driver/Sqlsrv/SqlsrvStatement.php
View file @
1b0e2e50
...
@@ -211,7 +211,13 @@ class SqlsrvStatement implements \Doctrine\DBAL\Driver\Statement
...
@@ -211,7 +211,13 @@ class SqlsrvStatement implements \Doctrine\DBAL\Driver\Statement
throw
new
\InvalidArgumentException
(
"Invalid fetch style: "
.
$fetchStyle
);
throw
new
\InvalidArgumentException
(
"Invalid fetch style: "
.
$fetchStyle
);
}
}
return
sqlsrv_fetch_array
(
$this
->
_sth
,
self
::
$fetchStyleMap
[
$fetchStyle
]);
$result
=
sqlsrv_fetch_array
(
$this
->
_sth
,
self
::
$fetchStyleMap
[
$fetchStyle
]);
if
(
!
$result
)
{
return
false
;
}
else
{
return
$result
;
}
}
}
/**
/**
...
...
lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php
View file @
1b0e2e50
...
@@ -150,17 +150,24 @@ class MsSqlSchemaManager extends AbstractSchemaManager
...
@@ -150,17 +150,24 @@ class MsSqlSchemaManager extends AbstractSchemaManager
'unsigned'
=>
(
bool
)
$unsigned
,
'unsigned'
=>
(
bool
)
$unsigned
,
'fixed'
=>
(
bool
)
$fixed
'fixed'
=>
(
bool
)
$fixed
);
);
$default
=
$tableColumn
[
'COLUMN_DEF'
];
while
(
$default
!=
(
$default2
=
preg_replace
(
"/^\((.*)\)$/"
,
'$1'
,
$default
)))
{
$default
=
$default2
;
}
// @todo
$options
=
array
(
$options
=
array
(
'length'
=>
((
int
)
$tableColumn
[
'LENGTH'
]
==
0
)
?
null
:
(
int
)
$tableColumn
[
'LENGTH'
],
'length'
=>
((
int
)
$tableColumn
[
'LENGTH'
]
==
0
)
?
null
:
(
int
)
$tableColumn
[
'LENGTH'
],
'unsigned'
=>
(
bool
)
$unsigned
,
'unsigned'
=>
(
bool
)
$unsigned
,
'fixed'
=>
(
bool
)
$fixed
,
'fixed'
=>
(
bool
)
$fixed
,
'default'
=>
$
tableColumn
[
'COLUMN_DEF'
]
!==
'(NULL)'
?
$tableColumn
[
'COLUMN_DEF'
]
:
null
,
'default'
=>
$
default
!==
'NULL'
?
$default
:
null
,
'notnull'
=>
(
bool
)
(
$tableColumn
[
'IS_NULLABLE'
]
!=
'YES'
),
'notnull'
=>
(
bool
)
(
$tableColumn
[
'IS_NULLABLE'
]
!=
'YES'
),
'scale'
=>
$tableColumn
[
'SCALE'
],
'scale'
=>
$tableColumn
[
'SCALE'
],
'precision'
=>
$tableColumn
[
'PRECISION'
],
'precision'
=>
$tableColumn
[
'PRECISION'
],
'platformOptions'
=>
array
(
'platformOptions'
=>
array
(
// @todo
'primary'
=>
false
,
'primary'
=>
false
,
'unique'
=>
false
,
'unique'
=>
false
,
'autoincrement'
=>
false
,
'autoincrement'
=>
false
,
...
...
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