What is the `[...]` in the sqlalchemy documentation?

Viewed 27

The Sqlalchemy documentation uses the [...] syntax in its examples. What does this symbol mean? Does the () also have some special meaning in this case? Example:

SELECT users.id AS users_id,
        users.name AS users_name,
        users.fullname AS users_fullname,
        users.nickname AS users_nickname
FROM users ORDER BY users.id
[...] ()
1 Answers

[...] in this case means "details omitted for clarity". For example, the tutorial example here would actually produce output like

2022-08-15 12:00:20,656 INFO sqlalchemy.engine.Engine BEGIN (implicit)
2022-08-15 12:00:20,658 INFO sqlalchemy.engine.Engine select 'hello world'
2022-08-15 12:00:20,658 INFO sqlalchemy.engine.Engine [generated in 0.00061s] ()
[('hello world',)]
2022-08-15 12:00:20,659 INFO sqlalchemy.engine.Engine ROLLBACK

but the [generated in 0.00061s] clutters things up so the tutorial omits it

BEGIN (implicit)
select 'hello world'
[...] ()
[('hello world',)]
ROLLBACK

As for the (), they show that no parameters were passed. If the query had been parameterized, e.g.,

result = conn.execute(sa.text("select :hello"), dict(hello='Howdy!'))

then the tutorial would have displayed

select ?
[...] ('Howdy!',)
Related