mcraken / platform

Cradle platform can be used to create a scale-able and container-less application.
19 stars 5 forks source link

How can i get pageable results through repository module? #13

Open Dourm opened 9 years ago

Dourm commented 9 years ago

How can i get pageable results with repository module (Cassandra)?

mcraken commented 9 years ago

Using the simple selection adapter, you can determine the size of the required results.

selectionAdapter.page(size).result();

Unfortunately, paging using start and size is not supported yet. I will update this issue once implemented.

Dourm commented 9 years ago

Thx,at CassandraConfig.java

private void loadSchemaProperties() {

        try {

            input = new FileInputStream("keyspace_schema/keyspace_schema.properties");

            prop.load(input);

            keySpaceName = prop.getProperty(KEYSPACE_NAME_PROPERTY_KEY);

            hosts = prop.getProperty(HOSTS_PROPERTY_KEY);

            input.close();

        } catch (Exception ex) {

            ex.printStackTrace();
        }
    }

i can't find the file that named "keyspace_schema/keyspace_schema.properties" !

mcraken commented 9 years ago

I added a sample keyspace schema folder, modify it to suit your needs. I suggest if you would like to update the code before trying again.

I was planning to add the schema file as soon as I commit a running sample. Nice to see someone taking interest.