Skip to content

feat: Optionally skip create table with argument to newAdapter#71

Closed
rogersgt wants to merge 2 commits intoapache:masterfrom
lassoworkforce:master
Closed

feat: Optionally skip create table with argument to newAdapter#71
rogersgt wants to merge 2 commits intoapache:masterfrom
lassoworkforce:master

Conversation

@rogersgt
Copy link
Contributor

@rogersgt rogersgt commented Jan 31, 2023

Fix: apache/casbin-node-casbin#418

See my question int he issues section of the node-casbin repo: apache/casbin-node-casbin#418. If there is already a way to do this, or a better pattern, I'm all for it. But I really think this is needed for many enterprise implementations.

@casbin-bot
Copy link

@nodece @Zxilly @Shivansh-yadav13 please review

@rogersgt rogersgt changed the title Optionally skip create table with optional flag Optionally skip create table with argument to newAdapter Jan 31, 2023
@coveralls
Copy link

coveralls commented Jan 31, 2023

Pull Request Test Coverage Report for Build 4056270362

  • 5 of 5 (100.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.05%) to 84.746%

Totals Coverage Status
Change from base Build 3105386997: -0.05%
Covered Lines: 116
Relevant Lines: 125

💛 - Coveralls

@rogersgt rogersgt changed the title Optionally skip create table with argument to newAdapter feat: Optionally skip create table with argument to newAdapter Jan 31, 2023
private autoCreate = true;

constructor(option: SequelizeAdapterOptions) {
constructor(option: SequelizeAdapterOptions, autoCreate = true) {
Copy link
Member

Choose a reason for hiding this comment

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

autoCreateTable

@@ -47,9 +49,10 @@ export class SequelizeAdapter implements Adapter {
* @param option sequelize connection option
*/
public static async newAdapter(
Copy link
Member

Choose a reason for hiding this comment

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

@hsluoyz
Copy link
Member

hsluoyz commented Feb 3, 2023

@rogersgt

@hsluoyz
Copy link
Member

hsluoyz commented Feb 14, 2023

@rogersgt hi, can you fix the issues according to the review?

@hsluoyz
Copy link
Member

hsluoyz commented Feb 18, 2023

Replaced by: #73

@hsluoyz hsluoyz closed this Feb 18, 2023
@rogersgt
Copy link
Contributor Author

Sorry for the delay here. Thanks for making the change @terry-xuan-gao!

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.

Using a readonly data source: Can you skip creation of the data source?

4 participants