Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
public
/
sequelize
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
不要怂,就是干,撸起袖子干!
Commit e7c81156
authored
May 29, 2012
by
Daniel Schwartz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding if statement around port declaration, and returning query-generator to original form
1 parent
dbbc9070
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
lib/dialects/postgres/connector-manager.js
lib/dialects/postgres/query-generator.js
lib/dialects/postgres/connector-manager.js
View file @
e7c8115
...
...
@@ -44,7 +44,7 @@ module.exports = (function() {
this
.
isConnecting
=
true
this
.
isConnected
=
false
var
conStr
=
'<%= protocol %>://<%= user %>:<%= password %>@<%= host %>
/<%= database %>'
var
conStr
=
'<%= protocol %>://<%= user %>:<%= password %>@<%= host %>
<% if(port) { %>:<%= port %><% } %>/<%= database %>'
;
conStr
=
Utils
.
_
.
template
(
conStr
)({
user
:
this
.
config
.
username
,
password
:
this
.
config
.
password
,
...
...
lib/dialects/postgres/query-generator.js
View file @
e7c8115
...
...
@@ -61,7 +61,7 @@ module.exports = (function() {
primaryKeys
[
tableName
]
=
[]
tables
[
tableName
]
=
{}
var
query
=
"CREATE TABLE <%= table %> (<%= attributes%>)"
var
query
=
"CREATE TABLE
IF NOT EXISTS
<%= table %> (<%= attributes%>)"
,
attrStr
=
Utils
.
_
.
map
(
attributes
,
function
(
dataType
,
attr
)
{
dataType
=
pgDataTypeMapping
(
tableName
,
attr
,
dataType
)
return
addQuotes
(
attr
)
+
" "
+
dataType
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment