forked from yasho3115/algorithmresult
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAlgorithmRepository.java
More file actions
34 lines (21 loc) · 1 KB
/
AlgorithmRepository.java
File metadata and controls
34 lines (21 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
package com.g4.fauxexchange.dao;
import java.util.List;
import com.g4.fauxexchange.model.AlgorithmResult;
import com.g4.fauxexchange.model.Result;
import com.g4.fauxexchange.model.Price;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.data.mongodb.repository.MongoRepository;
import org.springframework.data.mongodb.repository.Query;
import org.springframework.data.repository.query.Param;
public interface AlgorithmRepository extends MongoRepository<Result, Double> {
@Query(value = "{ 'code': ?0 }", fields = "{ 'results': 1, 'price': 1 }")
Result findByCode(Double Result);
@Query(value = "{}", fields="{ 'results': 1, 'price': { $slice: -1 } }")
static List<Result> FindAllRecentResults() {
}
// Result result = new Result();
// Result saveresult();
//static void saveAll(Object result) {
//return List<Result> Result;
}