Search Filters

(Difference between revisions)
Jump to: navigation, search
(Operators)
Line 21: Line 21:
 
! align="left" width="200px" | =
 
! align="left" width="200px" | =
 
| width="200px" | Igualdade
 
| width="200px" | Igualdade
| profiles.name.formatted = 'Guilherme Silva'
+
| profile.name.formatted = 'Guilherme Silva'
 
|+
 
|+
 
! align="left" width="200px" | !=
 
! align="left" width="200px" | !=
 
| width="200px" | Diferença
 
| width="200px" | Diferença
| profiles.name.formatted = 'Guilherme Silva'
+
| profile.name.formatted = 'Guilherme Silva'
 
|+
 
|+
 
! align="left" width="200px" | <
 
! align="left" width="200px" | <
 
| width="200px" | Menor que
 
| width="200px" | Menor que
| profiles.id < 100
+
| profile.id < 100
 
|+
 
|+
 
! align="left" width="200px" | >
 
! align="left" width="200px" | >
 
| width="200px" | Maior que
 
| width="200px" | Maior que
| profiles.id > 100
+
| profile.id > 100
 
|+
 
|+
 
! align="left" width="200px" | <=
 
! align="left" width="200px" | <=
 
| width="200px" | Menor ou igual
 
| width="200px" | Menor ou igual
| profiles.id <= 100
+
| profile.id <= 100
 
|+
 
|+
 
! align="left" width="200px" | >=
 
! align="left" width="200px" | >=
 
| width="200px" | Maior ou igual
 
| width="200px" | Maior ou igual
| profiles.id >= 100
+
| profile.id >= 100
 
|+
 
|+
 
! align="left" width="200px" | like
 
! align="left" width="200px" | like
 
| width="200px" | Operador "like"
 
| width="200px" | Operador "like"
| profiles.name.given_name like 'Guilher%'
+
| profile.name.given_name like 'Guilher%'
 
|+
 
|+
 
! align="left" width="200px" | between
 
! align="left" width="200px" | between
 
| width="200px" | Entre :A e :B
 
| width="200px" | Entre :A e :B
| profiles.id between 1 and 3
+
| profile.id between 1 and 3
 
|+
 
|+
 
! align="left" width="200px" | in
 
! align="left" width="200px" | in
 
| width="200px" | Operador "in"
 
| width="200px" | Operador "in"
| profiles.id IN (100, 99, 104)
+
| profile.id IN (100, 99, 104)
 
|+
 
|+
 
! align="left" width="200px" | is null
 
! align="left" width="200px" | is null
 
| width="200px" | Atributo é nulo
 
| width="200px" | Atributo é nulo
| profiles.religion is null
+
| profile.religion is null
 
|+
 
|+
 
! align="left" width="200px" | is not null
 
! align="left" width="200px" | is not null
 
| width="200px" | Atributo não é nulo
 
| width="200px" | Atributo não é nulo
| profiles.religion is not null
+
| profile.religion is not null
 
|}
 
|}
  

Revision as of 20:13, 23 April 2013

O padrão utilizado na busca é "SQL-like", ou seja, a sintaxe é muito parecida com o que usamos para consultas em bancos de dados relacionais. Alguns exemplos de queries:

SQL People Search API
select * from profile where profile.gender = 'male' profile.gender = 'male'
select * from profile where profile.gender = 'male' or profile.religion = 'Atheist' profile.gender = 'male' or profile.religion = 'Atheist'

Operators

Código Operação Exemplo
= Igualdade profile.name.formatted = 'Guilherme Silva'
 != Diferença profile.name.formatted = 'Guilherme Silva'
< Menor que profile.id < 100
> Maior que profile.id > 100
<= Menor ou igual profile.id <= 100
>= Maior ou igual profile.id >= 100
like Operador "like" profile.name.given_name like 'Guilher%'
between Entre :A e :B profile.id between 1 and 3
in Operador "in" profile.id IN (100, 99, 104)
is null Atributo é nulo profile.religion is null
is not null Atributo não é nulo profile.religion is not null

Fields

Os campos a serem buscados podem ser especificados no padrão "namespace.fieldname".

Temos disponíveis os seguintes namespaces e campos:

profile

Campo Explicação
profile.display_name Nome de Exibição
profile.name.formatted Nome completo
profile.name.family_name Sobrenome
profile.name.middle_name Nome do Meio
profile.name.given_name Primeiro Nome
profile.name.honorific_prefix Honorífico (prefixo)
profile.name.honorific_suffix Honorífico (sufixo)
profile.nickname Apelido
profile.updated Data da Última Atualização
profile.birthday Aniversário
profile.gender Sexo
profile.preferred_username Nome de Usuário Escolhido
profile.utf_offset Fuso Horário UTC
profile.about_me Sobre Mim
profile.current_location Localização Atual
profile.religion Religião
profile.status Último status do Twitter do contato, se disponível
Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox