public override Statement UseAsEndOfTempTableAndClone(IncludeIdentitySelectorStatement includeIdentitySelectorStatement) { includeIdentitySelectorStatement.IncludeDataInTempTable = true; var clone = new JsonStatement(SelectClause, Fields) { SelectClause = SelectClause.As <IScalarSelectClause>().CloneToOtherTable(includeIdentitySelectorStatement.ExportName), Orderings = Orderings, Mode = StatementMode.Select, ExportName = ExportName }; SelectClause = includeIdentitySelectorStatement; Limit = Offset = 0; return(clone); }