com.datastax.driver.core.querybuilder.Select.setDirty()方法的使用及代码示例

x33g5p2x  于2022-01-30 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(239)

本文整理了Java中com.datastax.driver.core.querybuilder.Select.setDirty()方法的一些代码示例,展示了Select.setDirty()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Select.setDirty()方法的具体详情如下:
包路径:com.datastax.driver.core.querybuilder.Select
类名称:Select
方法名:setDirty

Select.setDirty介绍

暂无

代码示例

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

  1. /**
  2. * Adds a {@code LIMIT} clause to this statement.
  3. *
  4. * @param limit the limit to set.
  5. * @return this statement.
  6. * @throws IllegalArgumentException if {@code limit <= 0}.
  7. * @throws IllegalStateException if a {@code LIMIT} clause has already been provided.
  8. */
  9. public Select limit(int limit) {
  10. if (limit <= 0)
  11. throw new IllegalArgumentException("Invalid LIMIT value, must be strictly positive");
  12. if (this.limit != null)
  13. throw new IllegalStateException("A LIMIT value has already been provided");
  14. this.limit = limit;
  15. setDirty();
  16. return this;
  17. }

代码示例来源:origin: com.datastax.cassandra/cassandra-driver-core

  1. /**
  2. * Adds a {@code PER PARTITION LIMIT} clause to this statement.
  3. *
  4. * <p>Note: support for {@code PER PARTITION LIMIT} clause is only available from Cassandra 3.6
  5. * onwards.
  6. *
  7. * @param perPartitionLimit the limit to set per partition.
  8. * @return this statement.
  9. * @throws IllegalArgumentException if {@code perPartitionLimit <= 0}.
  10. * @throws IllegalStateException if a {@code PER PARTITION LIMIT} clause has already been
  11. * provided.
  12. * @throws IllegalStateException if this statement is a {@code SELECT DISTINCT} statement.
  13. */
  14. public Select perPartitionLimit(int perPartitionLimit) {
  15. if (perPartitionLimit <= 0)
  16. throw new IllegalArgumentException(
  17. "Invalid PER PARTITION LIMIT value, must be strictly positive");
  18. if (this.perPartitionLimit != null)
  19. throw new IllegalStateException("A PER PARTITION LIMIT value has already been provided");
  20. if (isDistinct)
  21. throw new IllegalStateException(
  22. "PER PARTITION LIMIT is not allowed with SELECT DISTINCT queries");
  23. this.perPartitionLimit = perPartitionLimit;
  24. setDirty();
  25. return this;
  26. }

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

  1. /**
  2. * Adds a {@code LIMIT} clause to this statement.
  3. *
  4. * @param limit the limit to set.
  5. * @return this statement.
  6. * @throws IllegalArgumentException if {@code limit <= 0}.
  7. * @throws IllegalStateException if a {@code LIMIT} clause has already been
  8. * provided.
  9. */
  10. public Select limit(int limit) {
  11. if (limit <= 0)
  12. throw new IllegalArgumentException("Invalid LIMIT value, must be strictly positive");
  13. if (this.limit != null)
  14. throw new IllegalStateException("A LIMIT value has already been provided");
  15. this.limit = limit;
  16. setDirty();
  17. return this;
  18. }

代码示例来源:origin: com.yugabyte/cassandra-driver-core

  1. /**
  2. * Adds a {@code LIMIT} clause to this statement.
  3. *
  4. * @param limit the limit to set.
  5. * @return this statement.
  6. * @throws IllegalArgumentException if {@code limit <= 0}.
  7. * @throws IllegalStateException if a {@code LIMIT} clause has already been
  8. * provided.
  9. */
  10. public Select limit(int limit) {
  11. if (limit <= 0)
  12. throw new IllegalArgumentException("Invalid LIMIT value, must be strictly positive");
  13. if (this.limit != null)
  14. throw new IllegalStateException("A LIMIT value has already been provided");
  15. this.limit = limit;
  16. setDirty();
  17. return this;
  18. }

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

  1. /**
  2. * Adds a {@code LIMIT} clause to this statement.
  3. *
  4. * @param limit the limit to set.
  5. * @return this statement.
  6. * @throws IllegalArgumentException if {@code limit <= 0}.
  7. * @throws IllegalStateException if a {@code LIMIT} clause has already been
  8. * provided.
  9. */
  10. public Select limit(int limit) {
  11. if (limit <= 0)
  12. throw new IllegalArgumentException("Invalid LIMIT value, must be strictly positive");
  13. if (this.limit != null)
  14. throw new IllegalStateException("A LIMIT value has already been provided");
  15. this.limit = limit;
  16. setDirty();
  17. return this;
  18. }

代码示例来源:origin: com.facebook.presto.cassandra/cassandra-driver

  1. /**
  2. * Adds a {@code PER PARTITION LIMIT} clause to this statement.
  3. * <p>
  4. * Note: support for {@code PER PARTITION LIMIT} clause is only available from
  5. * Cassandra 3.6 onwards.
  6. *
  7. * @param perPartitionLimit the limit to set per partition.
  8. * @return this statement.
  9. * @throws IllegalArgumentException if {@code perPartitionLimit <= 0}.
  10. * @throws IllegalStateException if a {@code PER PARTITION LIMIT} clause has already been
  11. * provided.
  12. * @throws IllegalStateException if this statement is a {@code SELECT DISTINCT} statement.
  13. */
  14. public Select perPartitionLimit(int perPartitionLimit) {
  15. if (perPartitionLimit <= 0)
  16. throw new IllegalArgumentException("Invalid PER PARTITION LIMIT value, must be strictly positive");
  17. if (this.perPartitionLimit != null)
  18. throw new IllegalStateException("A PER PARTITION LIMIT value has already been provided");
  19. if (isDistinct)
  20. throw new IllegalStateException("PER PARTITION LIMIT is not allowed with SELECT DISTINCT queries");
  21. this.perPartitionLimit = perPartitionLimit;
  22. setDirty();
  23. return this;
  24. }

代码示例来源:origin: io.prestosql.cassandra/cassandra-driver

  1. /**
  2. * Adds a {@code PER PARTITION LIMIT} clause to this statement.
  3. * <p>
  4. * Note: support for {@code PER PARTITION LIMIT} clause is only available from
  5. * Cassandra 3.6 onwards.
  6. *
  7. * @param perPartitionLimit the limit to set per partition.
  8. * @return this statement.
  9. * @throws IllegalArgumentException if {@code perPartitionLimit <= 0}.
  10. * @throws IllegalStateException if a {@code PER PARTITION LIMIT} clause has already been
  11. * provided.
  12. * @throws IllegalStateException if this statement is a {@code SELECT DISTINCT} statement.
  13. */
  14. public Select perPartitionLimit(int perPartitionLimit) {
  15. if (perPartitionLimit <= 0)
  16. throw new IllegalArgumentException("Invalid PER PARTITION LIMIT value, must be strictly positive");
  17. if (this.perPartitionLimit != null)
  18. throw new IllegalStateException("A PER PARTITION LIMIT value has already been provided");
  19. if (isDistinct)
  20. throw new IllegalStateException("PER PARTITION LIMIT is not allowed with SELECT DISTINCT queries");
  21. this.perPartitionLimit = perPartitionLimit;
  22. setDirty();
  23. return this;
  24. }

代码示例来源:origin: com.yugabyte/cassandra-driver-core

  1. /**
  2. * Adds a {@code PER PARTITION LIMIT} clause to this statement.
  3. * <p>
  4. * Note: support for {@code PER PARTITION LIMIT} clause is only available from
  5. * Cassandra 3.6 onwards.
  6. *
  7. * @param perPartitionLimit the limit to set per partition.
  8. * @return this statement.
  9. * @throws IllegalArgumentException if {@code perPartitionLimit <= 0}.
  10. * @throws IllegalStateException if a {@code PER PARTITION LIMIT} clause has already been
  11. * provided.
  12. * @throws IllegalStateException if this statement is a {@code SELECT DISTINCT} statement.
  13. */
  14. public Select perPartitionLimit(int perPartitionLimit) {
  15. if (perPartitionLimit <= 0)
  16. throw new IllegalArgumentException("Invalid PER PARTITION LIMIT value, must be strictly positive");
  17. if (this.perPartitionLimit != null)
  18. throw new IllegalStateException("A PER PARTITION LIMIT value has already been provided");
  19. if (isDistinct)
  20. throw new IllegalStateException("PER PARTITION LIMIT is not allowed with SELECT DISTINCT queries");
  21. this.perPartitionLimit = perPartitionLimit;
  22. setDirty();
  23. return this;
  24. }

相关文章