-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* v1.8.0 * chore: StartFromFactory * chore: bump to v1.8.0 * chore: resolve imports
- Loading branch information
Showing
6 changed files
with
200 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
# The version of qdrant to use to download protos | ||
qdrantProtosVersion=v1.7.0 | ||
qdrantProtosVersion=v1.8.0 | ||
|
||
# The version of qdrant docker image to run integration tests against | ||
qdrantVersion=v1.7.0 | ||
qdrantVersion=v1.8.0 | ||
|
||
# The version of the client to generate | ||
packageVersion=1.7.2 | ||
packageVersion=1.8.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
package io.qdrant.client; | ||
|
||
import java.time.Instant; | ||
|
||
import com.google.protobuf.Timestamp; | ||
|
||
import io.qdrant.client.grpc.Points.StartFrom; | ||
|
||
/** | ||
* Convenience methods for constructing {@link StartFrom} | ||
*/ | ||
public final class StartFromFactory { | ||
private StartFromFactory() { | ||
} | ||
|
||
/** | ||
* Creates a {@link StartFrom} value from a {@link float} | ||
* | ||
* @param value The value | ||
* @return a new instance of {@link StartFrom} | ||
*/ | ||
public static StartFrom startFrom(float value) { | ||
return StartFrom.newBuilder().setFloat(value).build(); | ||
} | ||
|
||
/** | ||
* Creates a {@link StartFrom} value from a {@link int} | ||
* | ||
* @param value The value | ||
* @return a new instance of {@link StartFrom} | ||
*/ | ||
public static StartFrom startFrom(int value) { | ||
return StartFrom.newBuilder().setInteger(value).build(); | ||
} | ||
|
||
/** | ||
* Creates a {@link StartFrom} value from a {@link String} timestamp | ||
* | ||
* @param value The value | ||
* @return a new instance of {@link StartFrom} | ||
*/ | ||
public static StartFrom startFrom(String value) { | ||
return StartFrom.newBuilder().setDatetime(value).build(); | ||
} | ||
|
||
/** | ||
* Creates a {@link StartFrom} value from a {@link Timestamp} | ||
* | ||
* @param value The value | ||
* @return a new instance of {@link StartFrom} | ||
*/ | ||
public static StartFrom startFrom(Timestamp value) { | ||
return StartFrom.newBuilder().setTimestamp(value).build(); | ||
} | ||
|
||
/** | ||
* Creates a {@link StartFrom} value from a {@link Timestamp} | ||
* | ||
* @param value The value | ||
* @return a new instance of {@link StartFrom} | ||
*/ | ||
public static StartFrom startFrom(Instant value) { | ||
return StartFrom.newBuilder().setTimestamp(Timestamp.newBuilder().setSeconds(value.getEpochSecond())).build(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters