Skip to main content

pretty_print(query)

The pretty_print converts the SQL query to a human-readable format.

Syntax

SELECT content
FROM pretty_print(
(
(query)
)
);

Usage Example

SELECT content
FROM pretty_print(
(
SELECT * from load_html('https://en.wikipedia.org/wiki/New_Delhi')
)
)

Description of Example

The above example shows how to use the pretty_print function in LangDB.

+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| content |
+========================================================================================================================================================================================================================================+
| | content |
| | metadata | |
| |------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| -------------------------------------------------------------------------------|--------------------------------------------------------------------| |
| | #New Delhi - Wikipedia |
| | {"chunk_id":0,"source":"https://en.wikipedia.org/wiki/New_Delhi"} | |
| | Federal capital in Delhi, IndiaNew Delhi (,[6]Hindi:[ˈnəiːˈdɪlːiː], ISO: Naī Dillī), is the capital of India and a part of the National Capital Territory of Delhi (NCT). New Delhi is the seat of all three branches of the |
| Government of India, hosting the Rashtrapati Bhavan, Sansad Bhavan, and the Supreme Court. New Delhi is a municipality within the NCT, administered by the NDMC, which covers mostly Lutyens' Delhi and a few adjacent areas. The |
| municipal area is part of a larger administrative district, the New Delhi district. |
| | | |
| | Although colloquially Delhi and New Delhi are used interchangeably to refer to the National Capital Territory of Delhi, both are distinct entities, with the municipality and the New Delhi district forming a relatively small part |
| within the megacity of Delhi. The National Capital Region is an even larger entity, comprising the entire NCT along with adjoining districts in the two neighbouring states forming a continuously built-up area with it, including |
| Ghaziabad, Noida, Greater Noida, Meerut, YEIDA City, Gurgaon, and Faridabad. |
| | {"chunk_id":1,"source":"https://en.wikipedia.org/wiki/New_Delhi"} | |
| | The foundation stone of New Delhi, south of central Delhi, was laid by George V during the Delhi Durbar of 1911.[7] It was designed by British architects Edwin Lutyens and Herbert Baker. The new capital was inaugurated on 13 |
| February 1931,[8] by Viceroy and Governor-GeneralIrwin. |
| | | |
| | HistoryEstablishmentUntil December 1911, Calcutta was the capital of India during the British Rule. However, it had become the centre of the nationalist movements since the late nineteenth century, which led to the Partition of |
| Bengal by Viceroy Lord Curzon. This created massive political and religious upsurge including political assassinations of British officials in Calcutta. The anti-colonial sentiments among the public led to a complete boycott of |
| British goods, which forced the colonial government to reunite Bengal and immediately shift the capital to New Delhi.[9]Old Delhi had served as the political and financial centre of several empires of medieval India and the Delhi |
| Sultanate, most notably of the Mughal Empire from 1649 to 1857. During the early 1900s, a proposal was made to the British administration to shift the capital of the British Indian Empire, as India was officially named, from |
| Calcutta on the east coast, to Delhi.[ | {"chunk_id":2,"source":"https://en.wikipedia.org/wiki/New_Delhi"} | |