Coverage for packages/sql-smith/src/sql_smith/capability/has_returning.py: 57%

7 statements  

« prev     ^ index     » next       coverage.py v7.11.0, created at 2024-01-01 00:00 +0000

1from sql_smith.functions import identify 

2 

3 

4class HasReturningMixin: 

5 def returning(self, column: str): 

6 self._returning = identify(column) 

7 return self 

8 

9 def _apply_returning(self, query: "ExpressionInterface") -> "ExpressionInterface": 

10 return ( 

11 query.append("RETURNING {}", self._returning) if self._returning else query 

12 )