<h4>Example 1:</h4>
<strong>Abstract:</strong>
<ul>
    <li>Get all users</li>
    <li>from 0 to 10</li>
    <li>OrderBy UpdatedAt DESC</li>
</ul>
Request Example (only inner body)
<pre style="background:lightgreen;">
  &lt;UserSearch&gt;
    &lt;Advanced&gt;
      &lt;Offset&gt;0&lt;/Offset&gt;
      &lt;Limit&gt;10&lt;/Limit&gt;
      &lt;OrderBy&gt;UpdatedAt&lt;/OrderBy&gt;
      &lt;OrderDir&gt;DESC&lt;/OrderDir&gt;
      &lt;FullResponse&gt;0&lt;/FullResponse&gt;
      &lt;Filters/&gt;
    &lt;/Advanced&gt;
  &lt;/UserSearch&gt;
</pre>
Generates this query
<pre style="background:lightyellow;">
  SELECT
    *
  FROM
    `user` u
  ORDER BY
    `u`.`user_updated_at` DESC
  LIMIT
    10
</pre>

<h4>Example 2:</h4>
<strong>Abstract:</strong>
<ul>
    <li>Get all users</li>
    <li>from 0 to 10</li>
    <li>OrderBy UpdatedAt DESC</li>
    <li>WHERE emails addess ends with @life-style.de</li>
</ul>
Request Example (only inner body)
using wildcard and LIKE query
<pre style="background:lightgreen;">
&lt;UserSearch&gt;
    &lt;Advanced&gt;
      &lt;Offset&gt;0&lt;/Offset&gt;
      &lt;Limit&gt;10&lt;/Limit&gt;
      &lt;OrderBy&gt;UpdatedAt&lt;/OrderBy&gt;
      &lt;OrderDir&gt;DESC&lt;/OrderDir&gt;
      &lt;FullResponse&gt;0&lt;/FullResponse&gt;
      &lt;Filters&gt;
        &lt;Filter&gt;
          &lt;Operator&gt;AND&lt;/Operator&gt;
          &lt;Strategy&gt;LIKE&lt;/Strategy&gt;
          &lt;UserType&gt;
            &lt;Email&gt;*@life-style.de&lt;/Email&gt;
          &lt;/UserType&gt;
        &lt;/Filter&gt;
      &lt;/Filters&gt;
    &lt;/Advanced&gt;
  &lt;/UserSearch&gt;
</pre>
Generates this query
<pre style="background:lightyellow;">
  SELECT
      COUNT(*) c
  FROM
      `user` u
  WHERE
      `u`.`user_loweremail` LIKE '%@life-style.de'
  ORDER BY
      `u`.`user_updated_at` DESC
  LIMIT 10
</pre>

Request Example (only inner body)
using wildcard and REGEX query
<pre style="background:lightgreen;">
  &lt;UserSearch&gt;
    &lt;Advanced&gt;
      &lt;Offset&gt;0&lt;/Offset&gt;
      &lt;Limit&gt;10&lt;/Limit&gt;
      &lt;OrderBy&gt;UpdatedAt&lt;/OrderBy&gt;
      &lt;OrderDir&gt;DESC&lt;/OrderDir&gt;
      &lt;FullResponse&gt;0&lt;/FullResponse&gt;
      &lt;Filters&gt;
        &lt;Filter&gt;
          &lt;Operator&gt;AND&lt;/Operator&gt;
          &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
          &lt;UserType&gt;
            &lt;Email&gt;@life-style.de$&lt;/Email&gt;
          &lt;/UserType&gt;
        &lt;/Filter&gt;
      &lt;/Filters&gt;
    &lt;/Advanced&gt;
  &lt;/UserSearch&gt;
</pre>
Generates this query
<pre style="background:lightyellow;">
  SELECT
      COUNT(*) c
  FROM
      `user` u
  WHERE
      `u`.`user_loweremail` REGEXP '@life-style.de$'
</pre>

<h4>Example 3:</h4>
<strong>Abstract:</strong>
<ul>
    <li>Get all users</li>
    <li>from 0 to 10</li>
    <li>OrderBy UpdatedAt DESC</li>
    <li>WHERE emails address ends with .com</li>
    <li>AND fistname starts with séba</li>
</ul>
Request Example (only inner body)
using wildcard and LIKE query
<pre style="background:lightgreen;">
  &lt;UserSearch&gt;
    &lt;Advanced&gt;
      &lt;Offset&gt;0&lt;/Offset&gt;
      &lt;Limit&gt;10&lt;/Limit&gt;
      &lt;OrderBy&gt;UpdatedAt&lt;/OrderBy&gt;
      &lt;OrderDir&gt;DESC&lt;/OrderDir&gt;
      &lt;FullResponse&gt;0&lt;/FullResponse&gt;
      &lt;Filters&gt;
        &lt;Filter&gt;
            &lt;Operator&gt;AND&lt;/Operator&gt;
            &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
            &lt;UserType&gt;
                &lt;Email&gt;com$&lt;/Email&gt;
            &lt;/UserType&gt;
        &lt;/Filter&gt;
        &lt;Filter&gt;
            &lt;Operator&gt;AND&lt;/Operator&gt;
            &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
            &lt;UserType&gt;
                &lt;Firstname&gt;^séba&lt;/Firstname&gt;
            &lt;/UserType&gt;
        &lt;/Filter&gt;
      &lt;/Filters&gt;
    &lt;/Advanced&gt;
  &lt;/UserSearch&gt;
</pre>
Generates this query
<pre style="background:lightyellow;">
    SELECT
        *
    FROM
        `user` u
    WHERE
        `u`.`user_loweremail` REGEXP 'com$'
    AND `u`.`user_firstname` REGEXP '^séba'
    ORDER BY
        `u`.`user_updated_at` DESC
    LIMIT 10
</pre>

<h4>Example 4:</h4>
<strong>Abstract:</strong>
<ul>
    <li>Get all users</li>
    <li>from 0 to 10</li>
    <li>OrderBy UpdatedAt DESC</li>
    <li>WHERE emails address ends with .com</li>
    <li>AND user has active application called SsoAdmin</li>
    <li>AND application role UserAdminRegisterUser active</li>
</ul>
Request Example (only inner body)
using wildcard and LIKE query
<pre style="background:lightgreen;">
  &lt;UserSearch&gt;
    &lt;Advanced&gt;
      &lt;Offset&gt;0&lt;/Offset&gt;
      &lt;Limit&gt;10&lt;/Limit&gt;
      &lt;OrderBy&gt;UpdatedAt&lt;/OrderBy&gt;
      &lt;OrderDir&gt;DESC&lt;/OrderDir&gt;
      &lt;FullResponse&gt;0&lt;/FullResponse&gt;
      &lt;Filters&gt;
        &lt;Filter&gt;
            &lt;Operator&gt;AND&lt;/Operator&gt;
            &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
            &lt;UserType&gt;
                &lt;Email&gt;com$&lt;/Email&gt;
            &lt;/UserType&gt;
        &lt;/Filter&gt;
        &lt;Filter&gt;
            &lt;Operator&gt;AND&lt;/Operator&gt;
            &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
            &lt;ApplicationType&gt;
                &lt;Name&gt;SsoAdmin&lt;/Name&gt;
                &lt;Active&gt;1&lt;/Active&gt;
                &lt;RoleType&gt;
                    &lt;Name&gt;UserAdminRegisterUser&lt;/Name&gt;
                    &lt;Active&gt;1&lt;/Active&gt;
                &lt;/RoleType&gt;
            &lt;/ApplicationType&gt;
        &lt;/Filter&gt;
      &lt;/Filters&gt;
    &lt;/Advanced&gt;
  &lt;/UserSearch&gt;
</pre>
Generates this query
<pre style="background:lightyellow;">
    SELECT
        *
    FROM
        `user` u
    JOIN `user_application` AS ua USING (`user_id`)
    JOIN `user_application_role` AS uar ON (
        `ua`.`id` = `uar`.`userapplication_id`
    )
    WHERE
        `u`.`user_loweremail` REGEXP 'com$'
    AND (
        `ua`.`application_name` REGEXP 'SsoAdmin'
        AND `ua`.`isactive` = '1'
        AND `uar`.`role_name` = 'UserAdminRegisterUser'
        AND `uar`.`isactive` = '1'
    )
    ORDER BY
        `u`.`user_updated_at` DESC
    LIMIT 10
</pre>

<h4>Example 5:</h4>
<strong>Abstract:</strong>
<ul>
    <li>Get all users</li>
    <li>from 0 to 10</li>
    <li>OrderBy UpdatedAt DESC</li>
    <li>WHERE user has active application called SsoAdmin</li>
    <li>AND application role UserAdminRegisterUser active</li>
    <li>AND attribute TestAttribute1 has value testValue</li>
</ul>
Request Example (only inner body)
using wildcard and LIKE query
<pre style="background:lightgreen;">
  &lt;UserSearch&gt;
    &lt;Advanced&gt;
      &lt;Offset&gt;0&lt;/Offset&gt;
      &lt;Limit&gt;10&lt;/Limit&gt;
      &lt;OrderBy&gt;UpdatedAt&lt;/OrderBy&gt;
      &lt;OrderDir&gt;DESC&lt;/OrderDir&gt;
      &lt;FullResponse&gt;0&lt;/FullResponse&gt;
      &lt;Filters&gt;
        &lt;Filter&gt;
            &lt;Operator&gt;AND&lt;/Operator&gt;
            &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
            &lt;UserType&gt;
                &lt;Email&gt;com$&lt;/Email&gt;
            &lt;/UserType&gt;
        &lt;/Filter&gt;
        &lt;Filter&gt;
            &lt;Operator&gt;AND&lt;/Operator&gt;
            &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
            &lt;ApplicationType&gt;
                &lt;Name&gt;SsoAdmin&lt;/Name&gt;
                &lt;Active&gt;1&lt;/Active&gt;
                &lt;RoleType&gt;
                    &lt;Name&gt;UserAdminRegisterUser&lt;/Name&gt;
                    &lt;Active&gt;1&lt;/Active&gt;
                &lt;/RoleType&gt;
                &lt;AttributeType&gt;
                    &lt;Name&gt;TestAttribute1&lt;/Name&gt;
                    &lt;Value&gt;testValue&lt;/Value&gt;
                &lt;/AttributeType&gt;
            &lt;/ApplicationType&gt;
        &lt;/Filter&gt;
      &lt;/Filters&gt;
    &lt;/Advanced&gt;
  &lt;/UserSearch&gt;
</pre>
Generates this query
<pre style="background:lightyellow;">
    SELECT
        *
    FROM
        `user` u
    JOIN `user_application` AS ua USING (`user_id`)
    JOIN `user_application_attribute` AS uaa ON (
        `ua`.`id` = `uaa`.`userapplication_id`
    )
    JOIN `user_application_role` AS uar ON (
        `ua`.`id` = `uar`.`userapplication_id`
    )
    WHERE
        `u`.`user_loweremail` REGEXP 'com$'
    AND (
        `ua`.`application_name` REGEXP 'SsoAdmin'
        AND `ua`.`isactive` = '1'
        AND `uaa`.`attribute_name` = 'TestAttribute1'
        AND `uaa`.`attribute_value` = 'testValue'
        AND `uar`.`role_name` = 'UserAdminRegisterUser'
        AND `uar`.`isactive` = '1'
    )
    ORDER BY
        `u`.`user_updated_at` DESC
    LIMIT 10
</pre>

<h4>Example 6:</h4>
<h4>Very Complex and grouped example</h4>
<strong>Abstract:</strong>
<ul>
    <li>Get all users</li>
    <li>from 0 to 10</li>
    <li>OrderBy UpdatedAt DESC</li>
    <li>WHERE email ends with com</li>
    <li>AND user has active application called SsoAdmin</li>
    <li>OR</li>
    <li>emails address ends with .com</li>
    <li>AND fistname starts with séba</li>
</ul>
Request Example (only inner body)
using wildcard and LIKE query
<pre style="background:lightgreen;">
  &lt;UserSearch&gt;
    &lt;Advanced&gt;
      &lt;Offset&gt;0&lt;/Offset&gt;
      &lt;Limit&gt;10&lt;/Limit&gt;
      &lt;OrderBy&gt;UpdatedAt&lt;/OrderBy&gt;
      &lt;OrderDir&gt;DESC&lt;/OrderDir&gt;
      &lt;FullResponse&gt;0&lt;/FullResponse&gt;
      &lt;Filters&gt;
          &lt;Filter&gt;
            &lt;Operator&gt;AND&lt;/Operator&gt;
            &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
            &lt;UserType&gt;
              &lt;Email&gt;com$&lt;/Email&gt;
            &lt;/UserType&gt;
          &lt;/Filter&gt;
          &lt;Filter&gt;
            &lt;Operator&gt;AND&lt;/Operator&gt;
            &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
            &lt;ApplicationType&gt;
              &lt;Name&gt;SsoAdmin&lt;/Name&gt;
              &lt;Active&gt;1&lt;/Active&gt;
            &lt;/ApplicationType&gt;
          &lt;/Filter&gt;
          &lt;Filter&gt;
            &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
            &lt;Operator&gt;OR&lt;/Operator&gt;
            &lt;Filters&gt;
                &lt;Filter&gt;
                  &lt;Operator&gt;AND&lt;/Operator&gt;
                  &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
                  &lt;UserType&gt;
                    &lt;Email&gt;com$&lt;/Email&gt;
                  &lt;/UserType&gt;
                &lt;/Filter&gt;
                &lt;Filter&gt;
                  &lt;Operator&gt;AND&lt;/Operator&gt;
                  &lt;Strategy&gt;REGEX&lt;/Strategy&gt;
                  &lt;UserType&gt;
                    &lt;Firstname&gt;^séba&lt;/Firstname&gt;
                  &lt;/UserType&gt;
                &lt;/Filter&gt;
            &lt;/Filters&gt;
          &lt;/Filter&gt;
      &lt;/Filters&gt;
    &lt;/Advanced&gt;
  &lt;/UserSearch&gt;
</pre>
Generates this query
<pre style="background:lightyellow;">
    SELECT
        *
    FROM
        `user` u
    JOIN `user_application` AS ua USING (`user_id`)
    WHERE
        `u`.`user_loweremail` REGEXP 'com$'
    AND (
        `ua`.`application_name` REGEXP 'SsoAdmin'
        AND `ua`.`isactive` = '1'
    )
    OR (
        `u`.`user_loweremail` REGEXP 'com$'
        AND `u`.`user_firstname` REGEXP '^séba'
    )
    ORDER BY
        `u`.`user_updated_at` DESC
    LIMIT 10
</pre>
