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 634205a2
authored
Aug 24, 2010
by
Sascha Depold
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
added error handling to documentation
1 parent
5817c532
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
0 deletions
README.md
changelog.md
README.md
View file @
634205a
...
...
@@ -73,6 +73,12 @@ As you are able to specify an objects _skeleton_, the next step is to push it to
Project.drop(callback)
Task.drop(callback)
// with error handling:
Project.[sync|drop](function(table, error) {
if(error) // oooh, did you entered wrong database credentials?
else // ok ... everything is nice!
})
Because synchronizing and dropping all of your tables might be a lot of line to write, you can also let Sequelize do the work for you:
// create all tables... now!
...
...
@@ -81,6 +87,12 @@ Because synchronizing and dropping all of your tables might be a lot of line to
// and drop it!
sequelize.drop(callback)
// with error handling:
sequelize.[sync|drop](function(errors) {
if(errors.length > 0) // whooops
else // woot woot
})
## Creating and working with instances ##
In order to create instances of defined classes just do it as follows:
...
...
changelog.md
View file @
634205a
...
...
@@ -38,3 +38,4 @@
# 0.3.1 #
-
added error handling when defining invalid database credentials
-
Sequelize#sync, Sequelize#drop, model#sync, model#drop returns errors via callback
\ No newline at end of file
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