Remove Travis/CI from inherited repo as we'll be reconfiguring this soon. Update pom to reference Onshape, not 'gburd'.

This commit is contained in:
Greg Burd 2017-07-27 15:12:56 -04:00
parent 715fb0e673
commit b98f9ed7f5
4 changed files with 27 additions and 72 deletions

View file

@ -1,21 +0,0 @@
<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
http://maven.apache.org/xsd/settings-1.0.0.xsd">
<localRepository />
<interactiveMode />
<usePluginRegistry />
<offline />
<pluginGroups />
<servers>
<server>
<id>sonatype-nexus-snapshots</id>
<username>${env.OSS_USERNAME}</username>
<password>${env.OSS_PASSWORD}</password>
</server>
</servers>
<mirrors />
<proxies />
<profiles />
<activeProfiles />
</settings>

View file

@ -1,8 +0,0 @@
language: java
script: mvn deploy --settings .travis-oss-settings.xml
jdk:
- oraclejdk8
env:
global:
- OSS_USERNAME=3Lzxrh8k
- secure: U8xjxbMSNTEhJZLQMRiGT4LP1wsUqczlPRO68J5Yo9VG15SKGIDV6xfAcnhNEVUUL47Ubwkmzk2JO+tKgqsXM9O9KgXEAmEV4mdoBP48OFw85u+nUrbbKGDHd2sA9tBjvu0meqxffdIge7f3nNLEmzJHke5ru+yo2204EvSZYHc=

View file

@ -1,7 +1,6 @@
# helenus
Fast and easy, functional style cutting edge Java 8 and Scala 2.11 Cassandra client
# Helenus
Fast and easy, functional style cutting edge Java 8 and Scala 2.11 Cassandra client for C* 3.x
Current status: First application in production (may be more)
### Features
@ -14,11 +13,11 @@ Current status: First application in production (may be more)
### Requirements
* Latest JVM 8
* Latest Datastax Driver 2.1.5
* Latest Cassandra 2.1.4
* Latest Scala 2.11
* Latest Maven as well
* JVM 8
* Datastax Driver 3.x
* Cassandra 3.x
* Scala 2.11+
* Maven
### Maven
@ -59,7 +58,7 @@ Active development dependency for Scala 2.11:
Model definition:
```
@Table("timelines")
@Table
public interface Timeline {
@PartitionKey
@ -77,14 +76,14 @@ public interface Timeline {
Session initialization:
```
Timeline timeline = Helenus.dsl(Timeline.class);
HelenusSession session = Helenus.init(getSession()).showCql().add(Timeline.class).autoCreateDrop().get();
Timeline timeline = Helenus.dsl(Timeline.class, session.getMetadata());
```
Select example:
```
session.select(timeline::userId, timeline::timestamp, timeline::text)
.where(timeline::userId, Query.eq(userId))
.where(timeline::userId, eq(userId))
.orderBy(Query.desc(timeline::timestamp)).limit(5).sync()
.forEach(System.out::println);
```
@ -104,18 +103,12 @@ Account model:
```
@Table
public interface Account {
@PartitionKey
String accountId();
Date createdAt();
String organization();
String team();
String timezone();
Map<String, AccountUser> users();
}
```
@ -124,22 +117,16 @@ AccountUser model:
```
@UDT
public interface AccountUser {
String email();
String firstName();
String lastName();
}
```
Abstract repository:
```
public interface AbstractRepository {
HelenusSession session();
}
```
@ -150,32 +137,29 @@ import scala.concurrent.Future;
public interface AccountRepository extends AbstractRepository {
static final Account account = Helenus.dsl(Account.class);
static final String DEFAULT_TIMEZONE = "America/Los_Angeles";
default Future<Optional<Account>> findAccount(String accountId) {
return session()
.select(Account.class)
.where(account::accountId, eq(accountId))
.single()
.future();
}
default Future<Fun.Tuple2<ResultSet, String>> createAccount(
String email,
AccountUser user,
String organization,
String team,
String timezone) {
String accountId = AccountId.next();
if (timezone == null || timezone.isEmpty()) {
timezone = DEFAULT_TIMEZONE;
}
return session()
.insert()
.value(account::accountId, accountId)
@ -185,36 +169,36 @@ public interface AccountRepository extends AbstractRepository {
.value(account::timezone, timezone)
.value(account::users, ImmutableMap.of(email, user))
.future(accountId);
}
default Future<ResultSet> putAccountUser(String accountId, String email, AccountUser user) {
return session()
.update()
.put(account::users, email.toLowerCase(), user)
.where(account::accountId, eq(accountId))
.future();
}
default Future<ResultSet> removeAccountUser(String accountId, String email) {
return session()
.update()
.put(account::users, email.toLowerCase(), null)
.where(account::accountId, eq(accountId))
.future();
}
default Future<ResultSet> dropAccount(String accountId) {
return session()
.delete()
.where(account::accountId, eq(accountId))
.future();
}
}

View file

@ -22,13 +22,13 @@
<scm>
<url>https://github.net.helenus</url>
<connection>scm:git:git@github.com:gburd/helenus.git</connection>
<developerConnection>scm:git:git@github.com:gburd/helenus.git</developerConnection>
<connection>scm:git:git@github.com:onshape/helenus.git</connection>
<developerConnection>scm:git:git@github.com:onshape/helenus.git</developerConnection>
</scm>
<issueManagement>
<system>GitHub</system>
<url>https://github.com/gburd/helenus/issues</url>
<url>https://github.com/onshape/helenus/issues</url>
</issueManagement>
<parent>