Posts by Gilson Souza • 62 points
10 posts
-
0
votes1
answer35
viewsA: How to include surplus value in the result of a LIMIT SQL query?
One simple way to do this is by using Union. SELECT pais, ano, valor FROM idh ORDER BY valor LIMIT 10 union SELECT pais, ano, valor FROM idh where pais = 'BRASIL'…
-
1
votes1
answer37
viewsA: Auto increment in postgres/sequelize
In postgres when creating an auto-incremented field automatically a Quence is created. When we create a new record in the id field table it takes as default value the nextval() of Quence. To solve…
-
0
votes2
answers22
viewsA: Django queries Related Objects
By your question I note that you would like to list the answers to a question in the get_answers method, so I understand that it should be something like this: def get_answers(self): return…
-
-1
votes1
answer44
viewsA: Count based on the value of a field and index filter in Elasticsearch with Elasticsearch-dsl
You can do the query/filters and then perform the aggregation, it looks like this: from elasticsearch import Elasticsearch from elasticsearch_dsl import Q, A, Search es = Elasticsearch([{'host':…
-
0
votes1
answer33
viewsA: Search in Elastic pass a list and return all matchs
To search in a list you can use filters and must use "Terms" by passing the field and the list of values. GET /empresas/_search { "query": { "bool": { "filter": [ {"terms": {"CLIENT_ID":…
-
2
votes2
answers83
viewsA: How to consult with Elasticsearch-dsl?
If your search is only in 1 field, you can do as follows: es = Elasticsearch([{'host': es_settings.ELASTICSEARCH_HOST, 'port': es_settings.ELASTICSEARCH_PORT}]) s = Search(using=es, index="produto")…
-
-1
votes1
answer79
viewsA: How to get the page after authentication with requests?
Response that gives you status 200 also has a url property take the test: if response.history: print("Request was redirected") for resp in response.history: print(resp.status_code, resp.url)…
-
0
votes1
answer192
viewsA: Creation and editing in the Spring Framework
Lucas, regarding your item 1 dataRelease: You can use the Datetimeformat annotation to inform a mask in your model class. Already in your html when using Thymeleaf you can use the mask defined in…
-
1
votes1
answer252
viewsA: Generic dialog on Hymeleaf
You can use layout:Developer and layout:Ragment by what I understand you want the contents of the screens to be changed but without changing what is around as example the menus. on your "Main.html"…
-
1
votes3
answers516
viewsA: Error in POSTGRESQL Database Creation
Error script looks like Mysql. The first error is syntax error at or near "user" because there is a user object called in portgres. If you run the "select user" query it will return the connected…