Skip to content
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

Support for datastax driver mapper #50

Open
Sammers21 opened this issue Jan 17, 2020 · 0 comments
Open

Support for datastax driver mapper #50

Sammers21 opened this issue Jan 17, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@Sammers21
Copy link
Contributor

There is support for mappers in the latest major version of Datastax driver[1]. It works in the following way: you define :

  1. an Entity:
@Entity
public class Product {

    @PartitionKey private UUID id;
    String description;
}
  1. a DAO:
@Dao
public interface ProductDao {

    @Select
    Product findById(UUID productId);
}
  1. a Mapper:
@Mapper
public interface InventoryMapper {
  @DaoFactory
  ProductDao productDao(@DaoKeyspace CqlIdentifier keyspace);
}

Then you extend the compiling process with annotation processing[2], and the processor autogenerates implementation for the interfaces, so you can use them.

The question is: how can we extend this annotation processor so we can declare the interfaces with Vert.x Futures.

[1] - https://docs.datastax.com/en/developer/java-driver/4.4/manual/mapper/
[2] - https://docs.datastax.com/en/developer/java-driver/4.4/manual/mapper/config/#configuring-the-annotation-processor

@Sammers21 Sammers21 added the enhancement New feature or request label Jan 17, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant