Skip to content

Preserve format in Copy Create Statement #1300

@pamtbaau

Description

@pamtbaau

Details for the issue

When using Copy Create Statement and copying the statement in the SQL tab, the statement results in one long single line without multiple spaces, tabs and newlines.

CREATE VIEW equityExclAccounts as WITH recursive assets AS ( SELECT * FROM category ca WHERE type IN ('ASSETS', 'LIABILITIES') UNION SELECT ca.* FROM category ca JOIN assets a on a.id = ca.parentId WHERE ca.type != 'ACCOUNT' ) SELECT * FROM assets

When exporting the schema of a table/view, the schema preserves the newlines.

DROP VIEW IF EXISTS `equityExclAccounts`;
CREATE VIEW equityExclAccounts as 
WITH recursive assets AS 
( 
SELECT * 
FROM category ca 
WHERE type IN ('ASSETS', 'LIABILITIES')

UNION 

SELECT ca.* 
FROM category ca 
JOIN assets a on a.id = ca.parentId 
WHERE ca.type != 'ACCOUNT' 
) 
SELECT * FROM assets;
COMMIT;

Enhancement request:
Could newlines be preserved in Copy Create Statement too? And maybe tabs and spaces also?

Useful extra information

I'm opening this issue because:

  • DB4S is crashing
  • DB4S has a bug
  • DB4S needs a feature
  • DB4S has another problem

I'm using DB4S on:

  • Windows: ( version: 10 )
  • Linux: ( distro: ___ )
  • macOS: ( version: ___ )
  • Other: ___

I'm using DB4S version:

  • 3.10.1
  • 3.10.0
  • 3.9.1
  • Other:

I have also:

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions