-
Notifications
You must be signed in to change notification settings - Fork 1
Feature OQL show result count #20
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
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -34,3 +34,11 @@ | |
|
|
||
| #Other | ||
| /releases/ | ||
| /packages/ | ||
| /oqlmodule.mpr.bak | ||
| /oqlmodule.mpr.lock | ||
| /modeler-merge-marker | ||
| /nativemobile/builds/ | ||
| /vendorlib/temp/ | ||
| .DS_Store | ||
| /.svn/ | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure if this exclusion is necessary. We use git exclusively. |
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly the validation message would be better if it was straight forward and say something like "Provided OQL query is empty"
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In OQL snippet the container
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I am not sure if making the OQL input Text area be auto-growing is better than the current situation. In the master version the text box starts off with pre-determined size, but a user can still expand by dragging down. With auto grow, large OQL queries could take up quite some space and cause overflow on the parent page. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,53 @@ | ||
| // This file was generated by Mendix Studio Pro. | ||
| // | ||
| // WARNING: Only the following code will be retained when actions are regenerated: | ||
| // - the import list | ||
| // - the code between BEGIN USER CODE and END USER CODE | ||
| // - the code between BEGIN EXTRA CODE and END EXTRA CODE | ||
| // Other code you write will be lost the next time you deploy the project. | ||
| // Special characters, e.g., é, ö, à, etc. are supported in comments. | ||
|
|
||
| package oql.actions; | ||
|
|
||
| import com.mendix.systemwideinterfaces.core.IContext; | ||
| import com.mendix.systemwideinterfaces.core.UserAction; | ||
|
|
||
| public class CountLines extends UserAction<java.lang.Long> | ||
| { | ||
| private final java.lang.String InputString; | ||
|
|
||
| public CountLines( | ||
| IContext context, | ||
| java.lang.String _inputString | ||
| ) | ||
| { | ||
| super(context); | ||
| this.InputString = _inputString; | ||
| } | ||
|
|
||
| @java.lang.Override | ||
| public java.lang.Long executeAction() throws Exception | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We aim to test all new additions to the module, so please add some simple tests for this method/action. A few different |
||
| { | ||
| // BEGIN USER CODE | ||
| if (InputString == null) { | ||
| return 0L; | ||
| } | ||
| return InputString.lines() | ||
| .filter(line -> !line.trim().isEmpty()) | ||
| .count(); | ||
| // END USER CODE | ||
| } | ||
|
|
||
| /** | ||
| * Returns a string representation of this action | ||
| * @return a string representation of this action | ||
| */ | ||
| @java.lang.Override | ||
| public java.lang.String toString() | ||
| { | ||
| return "CountLines"; | ||
| } | ||
|
|
||
| // BEGIN EXTRA CODE | ||
| // END EXTRA CODE | ||
| } | ||
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.
This is OS specific so would rather propose for this to be included individually under
.git/info/exclude