Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,11 @@

#Other
/releases/
/packages/
/oqlmodule.mpr.bak
/oqlmodule.mpr.lock
/modeler-merge-marker
/nativemobile/builds/
/vendorlib/temp/
.DS_Store
Copy link
Contributor

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

/.svn/
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Binary file modified OQLModule.mpr
Copy link
Contributor

Choose a reason for hiding this comment

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

In ACT_ExecuteOQL the decision now named "OQL?" should have a more clear name like "Is OQL text empty?"

Copy link
Contributor

Choose a reason for hiding this comment

The 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"

Copy link
Contributor

Choose a reason for hiding this comment

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

In OQL snippet the container container2 has styling class oql-results, but that class is not defined in any scss file.

Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Binary file not shown.
53 changes: 53 additions & 0 deletions javasource/oql/actions/CountLines.java
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
Copy link
Contributor

Choose a reason for hiding this comment

The 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 InputString values with different number of lines, being empty or being null should be sufficient.

{
// 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
}