Giter VIP home page Giter VIP logo

ewa's People

Contributors

marco-sulla avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ewa's Issues

[FEATURE] Add Connection to enrich()

To Services, add an optional Connection parameter to the enrich() method.

Adds also the possibility to pass null as Connection parameter to Repository method. If null, method without Connection parameter is called.

[BUG] insert operation fails due cast exception

Repository code generated with :

  • Window 10
  • Python 3.6.8
  • database Microsoft sql Server
  • java 11.0.3

Steps to reproduce:

  1. The repository is generated as expected
  2. An insert operation fails due cast exception

You can find the generated code here invitoRegistrazione.zip

The repository tries to return the inserted primary key (Long) but a cast to BigDecimal throws an exception executing res_true = ((BigDecimal) res).longValue();

Code under investigation :

        final Object res = Sql2oUtility.getInsertedId("INVITO_REGISTRAZIONE", "IUDINVITOREGISTRAZIONE", con, key, Long.class);

        Object res_true;
        final Class<?> klass = Long.class;
        
        if (res != null && (klass == Long.class || klass == BigDecimal.class)) {
            res_true = ((BigDecimal) res).longValue();
        }
        else {
            res_true = res;
        }

### Thanks from Niuma Epp Team

Enjoy!

[FEATURE] Create generic abstracts and interfaces for repositories and services

Even if the code is auto-generated, is cumbersome that the same code is copy-pasted very much time.
I think it's better to implement a AbstractRepository and an Repository interface, that shares the common code to all repositories created with EWA. This abstract and interfacecan be useful also to people that do NOT want to use EWA. The same think should be done also for services.

For this reason, the findByNameOfUniqueId() must be renamed simply findById(). This also improves abstraction and encapsulation. Interface for models and aggregators should also be implemented.

PS: are specific interfaces for repo and services really needed? Evaluate to eliminate them.

[FEATURE] Create wheel and publish to Pypi

The install instructions are really difficult. I think that:

  1. A setup.py should be created
  2. A wheel should be created
  3. Release the last version with the wheel
  4. publish it to Pypi

This way, installing EWA will be simply pip install ewa.

PS: obligatory requirement of mssql and cx_Oraclein code must be removed. The code that requires these libraries must be loaded only if the .ini file requires that database. There's no need to impose the user to install all the supported drivers.

PPS: instructions to how to install the absurdly compicated cx_Oracle driver should remain.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.