Questions tagged [htsql]

HTSQL is a comprehensive navigational query language for relational databases.

Advanced Query Language

HTSQL is a complete query language featuring automated linking, aggregation, projections, filters, macros, a compositional syntax, and a full set of data types & functions.

Relational Database Gateway

HTSQL requests are translated to efficient SQL queries. HTSQL supports different SQL dialects including SQLite, PostgreSQL, MySQL, Oracle, and Microsoft SQL Server.

Web Service Integration

HTSQL is a web service that accepts queries as URLs, returning results formatted as HTML, JSON, CSV or XML. With HTSQL, databases can be accessed, secured, cached, and integrated using standard web technologies.

Embedded Reporting

HTSQL is a backend framework supporting visual dashboard and reporting tools. HTSQL can be included in client-side Javascript or server-side Python applications. HTSQL plugins can provide domain specific customizations.

Development Environment

HTSQL includes a command line and web based query editor with syntax highlighting, context-sensitive completion, and error messages with tips and suggestions.

Communication Tool

HTSQL is used for collaboration among business users, data analysts, and application developers. HTSQL queries can be emailed, embedded in reports, and included in feature requests.

16 questions
4
votes
1 answer

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, so I've been following the exact output of the…
ferada
  • 268
  • 7
  • 16
3
votes
1 answer

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 into JSON? Using the JSON formatter blows up: >>> rows =…
dirksen
  • 153
  • 1
  • 6
2
votes
1 answer

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, I see the table config_chapter_filenames, (and of…
Tim
  • 1,013
  • 3
  • 17
  • 36
2
votes
1 answer

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/demo in it from HERE. I am testing this on…
Ali Raza Bhayani
  • 3,045
  • 26
  • 20
2
votes
1 answer

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/demo in it from HERE. The default db used in the…
Ali Raza Bhayani
  • 3,045
  • 26
  • 20
1
vote
1 answer

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 table referencing code of school. So far I'm not able…
Saurav Kumar
  • 563
  • 1
  • 6
  • 13
1
vote
1 answer

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 python script (named htsql_wsgi.py and using these…
Dfinzgar
  • 88
  • 5
1
vote
1 answer

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 field: htsql =…
Nihey Takizawa
  • 797
  • 5
  • 8
1
vote
1 answer

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 pagination. So if I have a simple HTSQL query…
Ali Raza Bhayani
  • 3,045
  • 26
  • 20
1
vote
0 answers

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 so when I want to access data from a table in the…
Ali Raza Bhayani
  • 3,045
  • 26
  • 20
1
vote
1 answer

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 15 20 The summed result should be 45 I am using…
MHS
  • 2,260
  • 11
  • 31
  • 45
1
vote
1 answer

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: C A L L S Name Total Successful …
MHS
  • 2,260
  • 11
  • 31
  • 45
1
vote
1 answer

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 through configuration and/or extensions. Thank in…
trez
  • 478
  • 4
  • 10
0
votes
1 answer

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 queries that are formulated by software that…
Catherine Devlin
  • 7,383
  • 2
  • 25
  • 17
0
votes
1 answer

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 distinct ADJECTIVE_ID from adjectives_reviews with…
Stefan D
  • 1,229
  • 2
  • 15
  • 29
1
2