cql - Confluence Rest API - Return Pages sorted by position

I am using the Confluence API to retrieve children of a parent. The following API call returns the children of a Page with Id 123456, ordered by last modified date.rest/api/content/search?cql=parent=123456+order+by+last-modifiedHowever, I would like to have the results sorted by the position of the children. Any ideas?...Read more

cql - cassandra: How to fetch column names from Cassandra table in alphabetically sorted order?

In Cassandra once table is created,post which if we describe table it first shows partitioning key columns,next clustering key columns and than remaining columns in alphabetically sorted order.I have one real time business requirement where i have to take indexOf(column_name) when all columns are alphabetically sorted.Is there anyway by which we can sort all columns of Cassandra table alphabetically?...Read more

cql - Geoserver WFS Cross Layer Filtering and String IDs

I have a Geoserver WFS request with a cross layer filter based cql in it, that looks like this:...&CQL_FILTER=INTERSECTS(the_geom, querySingle('myLayerName','the_geom','the_id = F338'))This does not work. Geoserver is giving me this error message: java.lang.NullPointerException: PropertyDescriptor is null - did you request a property that does not exist?if I change the filter to this:&CQL_FILTER=INTERSECTS(the_geom, querySingle('myLayerName','the_geom','INCLUDE'))it is working.What could be going wrong in the first example? The id wit...Read more

cql - Most efficient way to get first N rows matching some criterion on ordinary (not clustering) columns

I want to return the first N rows from a Cassandra database filtering on some criterion, where the filtering is done on ordinary (not clustering) columns.Let's assume a simple table like this:CREATE TABLE test( id UUID, timestamp TIMESTAMP, value DOUBLE, PRIMARY KEY ((id), timestamp)) WITH CLUSTERING ORDER BY (timestamp ASC)Option 1SELECT timestamp, value FROM test WHERE id=? AND value<? LIMIT ? ALLOW FILTERINGThis is allowed, but ALLOW FILTERING is generally to be avoided. Having said that, is it really that bad if the query touches onl...Read more

Why CQL is suggesting me to use ALLOW FILTERING on update?

My simple update query is throwing following error.InvalidRequest: Error from server: code=220 [Invalid query] message="Cannot execute this query as it might involve data filtering and thus may have unpredictable performance. If you want to execute this query despite the performance unpredictability, use ALLOW FILTERING"As far as I know ALLOW FILTERING adds indexing and it is usually used to SELECT query. I tried to understand the reason behind this error. But could not find anything. Also, I have just started to learn CQL few concepts are new ...Read more

cql - What is the alternative of EXISTS in cassandra?

I am trying to rewrite a SQLite query in CQL.I know that there is no EXISTS keyword in CQL. I googled it's alternative. However, I couldn't find anything.UPDATE users SET passsword = ? WHERE user_name = ? AND EXISTS(SELECT 1 FROM users WHERE user_name = ? AND active_status = 1)How can I write this query in CQL? Any help is appreciated. Thank you....Read more

cql - How to balance load in Cassandra?

I'm using Elassandra 6.2.3I have set a cluster of 3 nodes and created a keyspace with replication factor of 2.I'm using Murmur3Partitioner and num_tokens=8 in Cassandra configuration.CREATE KEYSPACE mykeyspace WITH replication = {'class': 'NetworkTopologyStrategy', 'DC1': '2'} AND durable_writes = true;DESC mykeyspace;CREATE TABLE mykeyspace.mytable( f1 text, f2 timestamp, f3 text, f4 text, f5 int, PRIMARY KEY (f1, f2)) WITH CLUSTERING ORDER BY (f2 DESC) AND bloom_filter_fp_chance = 0.01 AND caching = {'keys': 'ALL', 'ro...Read more

cql - How can I get NDepend to fail analysis if new calls are used to a deprecated type?

We have a type named OldThing which we want to deprecate over time. We need an NDepend query/rule that says from this point on, don't add any more calls to 'OldThing'.We currently use NDepend and have a baseline build for checking things like don't make large methods even larger.So, we'd like to use NDepend to track any additional calls made to OldThing. I have the following CQL query:// <Name>Don't use OldThing going forwards</Name>warnif count > 0 let containsMethods = Methods.WithFullNameIn( "MyNamespace.OldType.get_Foo()"...Read more

cql - NDepend how to export all types that I use from .NET frameworks in my assembly

I'm not a .NET developer, but I need to solve one simply task: Create report that will contain all types from .Net frameworks that are using in given assembly.When I open the assembly in VisualNDepend I see that I need in ClassBrowser, but I don't know how to export all of these lists to file.If I understand correctly I need to create correct CQL query and then export it on desired format.Can you help me with this query? Thank....Read more

cql - NDepend: Get average LOC per method

Let's say I a have specific method set in my solution. How can i get an average number of code lines per method in the method set?Those numbers are usually shown in the statistic section of each NDepend report (like Sum, Average, Minimum, etc) but I want to be able to write queries for such numbers separately....Read more

cql - Multiple IF conditions in Cassandra lightweight transactions/CAS

So I'm trying to do a CAS (compare-and-set) type operation in Cassandra, where I want to do a data update only if a particular non-primary-key column is NULL or < ? where ? is supplied by client-side code.How do I do this? Something like the following doesn't work:UPDATE my_dbs.foo SET col1=5 WHERE id=1 IF (col1 = NULL OR col1 < 4);The error I get is similar to the following:SyntaxException: <ErrorMessage code=2000 [Syntax error in CQL query] message="line 1:149 no viable alternative at input '(' (...How do I do this in Cassandra 2.0/2...Read more

cassandra 2.1 - Difference between CQL insert and update?

I'm new to Cassandra and I come from a relational world. When I was playing with CQL I observed that I didn't find any difference. For ex:when I execute below query update product set price=100, currency=USD where productID=12345;then CQL creates new row in the table. In RDBMS this won't work since there is no product with productID = 12345.Can you provide some insight ?...Read more

geotools - How can i use CQL Filter [attr IN List ]?

I am trying to use the In filter of CQL on my query as cited on the documentation but it is not working and the parsing error I'm getting says there is no IN filter in CQL : org.geotools.filter.text.cql2.CQLException: Encountered "IS IN" at line 1, column 15.Was expecting one of: "(" ... ":" ... <IDENTIFIER> ... "." ... <NOT> ... "like" ... "is" "null" ... "is" <NOT> ... "exists" ... "does-not-exist" ... "tequals" ... "before" ... "after" ... "during" ... "between" ... <EQ>...Read more