Questions tagged [predicates]

Predicates are functions that return the boolean values, `True` or `False`.

In computing, Predicates are functions that return the boolean values, True or False. Some languages and frameworks treat them specially.

See also Wikipedia.

There are alternate (and possibly more mainstream) meanings. See Wikipedia.

108 questions
2
votes
1 answer

How to join tables using Query DSL

I am using queryDsl for complex search queries in my application. I am new to querydsl. I have started with the below code to fetch few rows from one single table(TableA). But I have to find list of person(Count) with the same id in some other…
Java_User
  • 475
  • 2
  • 11
  • 30
2
votes
1 answer

Neo4J : intersection and predicates

I'm working on a project involving Neo4J Db and I'm facing a problem I can't solve by myself. We are dealing with Acl in a graph. Each Acl is linked to a set of metadata. Items are also linked to those metadata. A metadata grants access to one item…
2
votes
2 answers

Create a predicate builder for (x => listOfInts.Contains(x.ListOfIntsToCheck))

I'm trying to build a predicate builder which return a predicate that checks whether a list of ints contains another list of ints. So far I have this public static Expression> DynamicIntContains(string property,…
Dan
  • 1,450
  • 1
  • 17
  • 34
2
votes
2 answers

linq findall with multiple predicates

In C# I have an object with a name and surname property and have created a list of these objects, List. I'd like to filter this List basing it on a name and a surname, but in the list some person can have surname null, so I'd like to…
2
votes
3 answers

XSL predicate increase for each iteration of a for-each

Quick Question: Is there a way to increment the predicate of an XPATH, by using a variable, like itereating through an array in C? For example /XPATH/element[i] I am trying to use an XSL to access data from an XML using XPATHS. The XML is the output…
2
votes
1 answer

breeze.js mixing AND and OR predicates

I'm trying to configure the proper syntax for breeze.js when mixing AND and OR predicates. I did not see an example on the breeze site and could not find one anywhere else. Basically I want to do something like this in my WHERE clause: ( age > 30 …
mwill
  • 424
  • 7
  • 21
2
votes
2 answers

selecting maximum field of a column using query dsl predicate

Im new to query dsl.Im using Spring repositories to get the result set.And one case i have to get the maximum of a column and get the fields in to an entity.My predicate code is below.I get error once i run this code. public static Predicate…
2
votes
1 answer

Comparison based on Clojure types

I have the following record type that I am trying to test: (defrecord FirstOrderState [datum matrix] State ;; implementation goes here ... ) I am trying to branch based on the above type, but am not getting the results I need (def state…
dtg
  • 1,803
  • 4
  • 30
  • 44
2
votes
1 answer

Android List filter

I have a List of File object I want to filter according to some rules like typology (audio, video, photo) or capture date/time, or Exif informations (in case of photos). I can do it with some for cicles for example. There's a smart way to do it? I…
phcaze
  • 1,707
  • 5
  • 27
  • 58
2
votes
2 answers

LINQ to SQL where clause verifying string contains list element

I'm using a view returning Domains according to an id. The Domains column can be 'Geography' or can be stuffed domains 'Geography,History'. (In any way, the data returned is a VARCHAR) In my C# code, I have a list containing main domains: private…
Francis P
  • 13,377
  • 3
  • 27
  • 51
2
votes
2 answers

antlr pass parameter and semantic predicate

I use ANTLR in the Eclipse environment. I want to pass an attribute (n.text) to another rule (description) and also use a semantic predicate in the latter rule to validate the input in relation to n.text. Here is my code: useCaseSpecification :…
Marinos
  • 21
  • 2
2
votes
2 answers

XPath with multiple predicates

I have a collection of plays and poems from different authors. My XML looks like this: Henry IV, Part 1 1H4 play
mfroese
  • 309
  • 1
  • 5
  • 18
1
vote
1 answer

How do you retrieve the last month's entries from core data

how do I ask core data to fetch me the last 30 elements entered or alternatively the elements entered within a month of today?
Ayrad
  • 3,996
  • 8
  • 45
  • 86
1
vote
3 answers

Predicates#and: any way to access the internal predicates?

I'm using andPredicate = Predicates.and(firstPredicate, secondPredicate); Now I have to serialize the andPredicate (as a JsonObject) and need to access the internal list of the used predicates to gain access to the members of each single…
oschrenk
  • 4,080
  • 4
  • 22
  • 25
1
vote
1 answer

ANTLR resolving non-LL(*) problems and syntactic predicates

consider following rules in the parser: expression : IDENTIFIER | (...) | procedure_call // e.g. (foo 1 2 3) | macro_use // e.g. (xyz (some datum)) ; procedure_call : '(' expression expression* ')' …
zhujik
  • 6,514
  • 2
  • 36
  • 43