-
Notifications
You must be signed in to change notification settings - Fork 313
Set starting state for editor as empty sql tab #300
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
Conversation
2659ba4 to
45d9e95
Compare
|
testing sql queries doesn't need to be a file, it should just be in memory |
it just a new tab in editor without saving. |
80e8116 to
17698c1
Compare
15bee6d to
98dc883
Compare
web/client/src/models/initial.ts
Outdated
| return this._initial; | ||
| } | ||
|
|
||
| get isModel(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What does isModel mean? Are there subclasses that override this function and return false?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it just a flag that signaling this object is a model, does not have to be a getter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, but is there a case where isModel is false? How is this flag used?
| return this.files.length > 0; | ||
| } | ||
|
|
||
| get withDirectories(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasDirectories?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i used with for similar cases in other places , so juts for consistency . Or i can rename everywhere
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think similar to isFoo, hasFoo is more indicative of boolean than withFoo. It's okay for now though.
| return this.directories.length === 0 && this.files.length === 0; | ||
| } | ||
|
|
||
| get withFiles(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasFiles?
| return this.path === ''; | ||
| } | ||
|
|
||
| get withParent(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
hasParent?
web/client/src/models/artifact.ts
Outdated
|
|
||
| rename(newName: string): void { | ||
| if (this.isLocal === false) { | ||
| if (this.parent?.isModel) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use this.hasParent()/this.withParent()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| return this.files.length > 0; | ||
| } | ||
|
|
||
| get withDirectories(): boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think similar to isFoo, hasFoo is more indicative of boolean than withFoo. It's okay for now though.

Add Models for File and Directory
Add ability to add empty sql file to test sql queries