Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I added scheme support for showAllTables and showTablesQuery for postgresql #5515

Closed

Conversation

okyoky
Copy link

@okyoky okyoky commented Mar 2, 2016

No description provided.

return "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type LIKE '%TABLE' AND table_name != 'spatial_ref_sys';";
showTablesQuery: function(options) {
options = options || {};
options.schema = options.schema || 'public';
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you taken a look at extractTableDetails?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi!

Sorry for my bad english...

I want use sequelize-auto for generate models. sequelize-auto use showAllTables.

My next step (after U accept my commit): commit a patch to sequelize-auto for use schema option.

  1. márc. 2. dátummal, 9:52 időpontban Mick Hansen notifications@github.com írta:

In lib/dialects/postgres/query-generator.js #5515 (comment):

@@ -102,8 +102,10 @@ var QueryGenerator = {
});
},

  • showTablesQuery: function() {
  • return "SELECT table_name FROM information_schema.tables WHERE table_schema = 'public' AND table_type LIKE '%TABLE' AND table_name != 'spatial_ref_sys';";
  • showTablesQuery: function(options) {
  • options = options || {};
  • options.schema = options.schema || 'public';
    Have you taken a look at extractTableDetails?


Reply to this email directly or view it on GitHub https://github.com/sequelize/sequelize/pull/5515/files#r54694477.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right, but take a look at the extractTableDetails method since that might help you here.

@mickhansen
Copy link
Contributor

A test would be great

@janmeier
Copy link
Member

No response - closing. Feel free to comment if you get time to work more on this @okyoky

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants