Commit 2fdcb28c authored by François Agneray's avatar François Agneray
Browse files

Change package name Utils to Search

parent 03c27700
Pipeline #5055 passed with stages
in 2 minutes and 58 seconds
......@@ -53,6 +53,6 @@ DATABASE_DEV_MODE: 0
## Few examples with curl
* To list all datasets available in the default instance => http://localhost:8080/instance/default/dataset
* To print all data for the obs_cat dataset with column 1, 2 and 3 => http://localhost:8080/search/obs_cat?a=1;2;3
* To count the number of data available for a request => http://localhost:8080/search/obs_cat?a=count
* To print only 3 obs_cat data (search by id) => http://localhost:8080/search/obs_cat?a=1;2;3&c=1::in::104600094|104600095|104600108
\ No newline at end of file
* To print all data for the obs_cat dataset with column 1, 2 and 3 => http://localhost:8080/search/observations?a=1;2;3
* To count the number of data available for a request => http://localhost:8080/search/observations?a=count
* To print only 3 obs_cat data (search by id) => http://localhost:8080/search/observations?a=1;2;3&c=1::in::418|419|420
\ No newline at end of file
......@@ -81,7 +81,7 @@ $container->set('App\Action\DatabaseAction', function (ContainerInterface $c) {
});
$container->set('App\Action\TableListAction', function (ContainerInterface $c) {
return new App\Action\TableListAction($c->get('em'), new App\Utils\DBALConnectionFactory());
return new App\Action\TableListAction($c->get('em'), new App\Search\DBALConnectionFactory());
});
$container->set('App\Action\AdminFileExplorerAction', function (ContainerInterface $c) {
......@@ -133,7 +133,7 @@ $container->set('App\Action\DatasetFamilyAction', function (ContainerInterface $
});
$container->set('App\Action\DatasetListAction', function (ContainerInterface $c) {
return new App\Action\DatasetListAction($c->get('em'), new App\Utils\DBALConnectionFactory());
return new App\Action\DatasetListAction($c->get('em'), new App\Search\DBALConnectionFactory());
});
$container->set('App\Action\DatasetAction', function (ContainerInterface $c) {
......@@ -177,14 +177,14 @@ $container->set('App\Action\AttributeAction', function (ContainerInterface $c) {
});
$container->set('App\Action\AttributeDistinctAction', function (ContainerInterface $c) {
return new App\Action\AttributeDistinctAction($c->get('em'), new App\Utils\DBALConnectionFactory());
return new App\Action\AttributeDistinctAction($c->get('em'), new App\Search\DBALConnectionFactory());
});
$container->set('App\Action\SearchAction', function (ContainerInterface $c) {
return new App\Action\SearchAction(
$c->get('em'),
new App\Utils\DBALConnectionFactory(),
new App\Utils\Operator\OperatorFactory(),
new App\Search\DBALConnectionFactory(),
new App\Search\Operator\OperatorFactory(),
$c->get(SETTINGS)['token']
);
});
......
......@@ -16,7 +16,7 @@ use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Slim\Exception\HttpNotFoundException;
use Doctrine\ORM\EntityManagerInterface;
use App\Utils\DBALConnectionFactory;
use App\Search\DBALConnectionFactory;
use PDO;
final class AttributeDistinctAction extends AbstractAction
......
......@@ -17,7 +17,7 @@ use Psr\Http\Message\ResponseInterface as Response;
use Slim\Exception\HttpBadRequestException;
use Slim\Exception\HttpNotFoundException;
use Doctrine\ORM\EntityManagerInterface;
use App\Utils\DBALConnectionFactory;
use App\Search\DBALConnectionFactory;
use App\Entity\Project;
use App\Entity\DatasetFamily;
use App\Entity\Dataset;
......
......@@ -20,9 +20,9 @@ use Doctrine\ORM\EntityManagerInterface;
use Doctrine\DBAL\Query\QueryBuilder;
use Doctrine\DBAL\Driver\Statement;
use Doctrine\DBAL\Query\Expression\CompositeExpression;
use App\Utils\DBALConnectionFactory;
use App\Utils\Operator\OperatorFactory;
use App\Utils\SearchException;
use App\Search\DBALConnectionFactory;
use App\Search\Operator\OperatorFactory;
use App\Search\SearchException;
use App\Entity\Dataset;
use App\Entity\Attribute;
......
......@@ -16,7 +16,7 @@ use Psr\Http\Message\ServerRequestInterface as Request;
use Psr\Http\Message\ResponseInterface as Response;
use Slim\Exception\HttpNotFoundException;
use Doctrine\ORM\EntityManagerInterface;
use App\Utils\DBALConnectionFactory;
use App\Search\DBALConnectionFactory;
use App\Entity\Database;
final class TableListAction extends AbstractAction
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils;
namespace App\Search;
use Doctrine\DBAL\DriverManager;
use Doctrine\DBAL\Connection;
......@@ -20,7 +20,7 @@ use App\Entity\Database;
* Factory used to create a Doctrine DBAL connection to a business database
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils
* @package App\Search
*/
class DBALConnectionFactory
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
use Doctrine\DBAL\Query\Expression\CompositeExpression;
......@@ -19,7 +19,7 @@ use Doctrine\DBAL\Query\Expression\CompositeExpression;
* Operator that represents a between of a where clause
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
class Between extends Operator
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
......@@ -18,7 +18,7 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
* Operator that represents an equal (=) of a where clause
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
class Equal extends Operator
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
......@@ -18,7 +18,7 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
* Operator that represents a greater than (>) of a where clause
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
class GreaterThan extends Operator
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
......@@ -18,7 +18,7 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
* Operator that represents a greater than or equal to (>=) of a where clause
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
class GreaterThanEqual extends Operator
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
/**
* Interface that represents an operator.
......@@ -18,7 +18,7 @@ namespace App\Utils\Operator;
* Example: column1 = value
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
interface IOperator
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
......@@ -18,7 +18,7 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
* Interface that represents the factory of operators
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
interface IOperatorFactory
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
......@@ -18,7 +18,7 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
* Operator that represents a sql in of a where clause
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
class In extends Operator
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
use Doctrine\DBAL\Query\Expression\CompositeExpression;
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
......@@ -18,7 +18,7 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
* Operator that represents an less than (<) of a where clause
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
class LessThan extends Operator
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
......@@ -18,7 +18,7 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
* Operator that represents a less than or equal to (<=) of a where clause
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
class LessThanEqual extends Operator
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
......@@ -18,7 +18,7 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
* Operator that represents like of a where clause
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
class Like extends Operator
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
......@@ -18,7 +18,7 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
* Operator that represents not equal of a where clause
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
class NotEqual extends Operator
{
......
......@@ -10,7 +10,7 @@
*/
declare(strict_types=1);
namespace App\Utils\Operator;
namespace App\Search\Operator;
use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
......@@ -18,7 +18,7 @@ use Doctrine\DBAL\Query\Expression\ExpressionBuilder;
* Operator that represents a sql not in of a where clause
*
* @author François Agneray <francois.agneray@lam.fr>
* @package App\Utils\Operator
* @package App\Search\Operator
*/
class NotIn extends Operator
{
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment