Questions tagged [htsql]
HTSQL is a comprehensive navigational query language for relational databases.
16
questions
0
votes
1
answer
35
views
Change default HTSQL output format
I need to set my HTSQL server to act as a JSON API server, returning JSON-formatted output by default, not only when a query is followed by /:json. Is there a way to do this?
Reason: I need to send ...
1
vote
1
answer
80
views
How to join two tables in HTSQL specific to any columns
HTSQL works when two tables are properly linked with foreign key.
For example:
school can be easily joined with department if we have properly defined a foreign key say school_code of department ...
4
votes
1
answer
115
views
Dealing with grammar ambiguity while parsing HTSQL
I'm writing a grammar to parse HTSQL syntax and am stuck with how to deal with the reuse of the / character for both the segment and division operators. The described grammar isn't terribly formal, ...
1
vote
1
answer
170
views
Cant establish connection: HTSQL via mod_wsgi (file not found)
I would like to integrate HTSQL on apache server using mod_wsgi.
Both apache and mod_wsgi were successfully configured, hello world python script executes and works!
However, when I try to run HTSQL ...
1
vote
1
answer
712
views
How do I query UUID values without having to explicitly cast them to string in HTSQL
I have a table that is indexed by a UUID field, using postgres' uuid-ossp extension, everything running on a python application. Every time I filter the UUID field I have to explicitly cast the uuid ...
0
votes
1
answer
175
views
HTSQL generated MySQL query is extremely slow
I have a database with two tables:
adjectives - ID primary key; NAME varchar;
adjectives_reviews - ID primary key; ADJECTIVE_ID foreign key; REVIEW_ID foreign key; COUNT int
I want to get a list of ...
3
votes
1
answer
130
views
How to output json using HTSQL's python library
From the example:
>>> from htsql import HTSQL
>>> htsql = HTSQL("pgsql:///htsql_demo")
>>> rows = htsql.produce("/school{name, count(department)}")
How do I convert rows ...
1
vote
1
answer
138
views
HTSQL - Get Count/number of records to be returned by a query
I am trying to achieve server side pagination with HTSQL and jQuery Datatables with server side being Django. The datatable initially requires total number of records so that it could manage the ...
1
vote
0
answers
132
views
HTSQL shell's Get Request Not compatible with Gunicorn+Nginx for long queries
I am using HTSQL with Django. I use HTSQL shell to check/generate my queries and then use them for rendering data in json and raw formats.
so like, my HTSQL shell url is:
http://127.0.0.1:8000/htsql
...
1
vote
1
answer
106
views
How to sum distinctly the values of a single column using htsql?
I have multiple records in my table's column, most of them are duplicate entries. I want to sum them up so that what ever the number is duplicate should be summed up just once, like:
Numbers
10
10
10
...
1
vote
1
answer
72
views
How to Merge the Headers of multiple columns in HTSQL
I am making a Table in HTSQL, which results like:
Name Total_Calls Successful_Calls Failed_Calls
John 9 5 4
Where as I want to merge the headers like:
...
0
votes
0
answers
92
views
HTSQL Select widget not rendering results
When I attempt to render a select widget using HTRAF, I get an "Uncaught TypeError: Cannot read property 'length' of undefined" on line 776 of jquery.htraf.js. The data-htsql attribute is filled with ...
2
votes
1
answer
221
views
htsql django and manytomany relations
In HTSQL, can you query for a manytomany relation?
In my Django project (app name is config) I have a model Chapter with a ManyToMany relation with FileName.
When I view the actual sqlite3 database, ...
2
votes
1
answer
335
views
Django HTSQL Web Interface for writing queries is not responding
I am trying to use HTSQL for one of my Django projects. For that I followed the procedure given HERE for furnishing HTSQL/Django requirements. Then I cloned the HTSQL repository for trying the example/...
2
votes
1
answer
279
views
Django HTSQL TransactionManagementError with sqlite as well as PostgreSQL backend
I am trying to use HTSQL for one of my Django projects. For that I followed the procedure given HERE for furnishing HTSQL/Django requirements. Then I cloned the HTSQL repository for trying the example/...
1
vote
1
answer
174
views
Customizing csv output in htsql
I would like to know if somebody knows a way to customize the csv output in htsql, and especially the delimiter and the encoding ?
I would like to avoid iterating over each result and find a way ...