Skip to content

Commit e0497a9

Browse files
fix: generated files
1 parent b181f66 commit e0497a9

8 files changed

Lines changed: 24 additions & 24 deletions

File tree

examples/MySqlConnectorDapperExample/QuerySql.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ public class GetAuthorArgs
4949
}
5050
}
5151

52-
private const string ListAuthorsSql = "SELECT id, name, bio FROM authors ORDER BY name; SELECT LAST_INSERT_ID()";
52+
private const string ListAuthorsSql = "SELECT id, name, bio FROM authors ORDER BY name ; SELECT LAST_INSERT_ID ( ) ";
5353
public class ListAuthorsRow
5454
{
5555
public required long Id { get; init; }
@@ -123,7 +123,7 @@ public class GetAuthorByIdArgs
123123
}
124124
}
125125

126-
private const string GetAuthorByNamePatternSql = "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE(@name_pattern, '%'); SELECT LAST_INSERT_ID()";
126+
private const string GetAuthorByNamePatternSql = "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE ( @name_pattern , '%' ) ; SELECT LAST_INSERT_ID ( ) ";
127127
public class GetAuthorByNamePatternRow
128128
{
129129
public required long Id { get; init; }
@@ -145,7 +145,7 @@ public async Task<List<GetAuthorByNamePatternRow>> GetAuthorByNamePattern(GetAut
145145
}
146146
}
147147

148-
private const string DeleteAuthorSql = "DELETE FROM authors WHERE name = @name; SELECT LAST_INSERT_ID()";
148+
private const string DeleteAuthorSql = "DELETE FROM authors WHERE name = @name ; SELECT LAST_INSERT_ID ( ) ";
149149
public class DeleteAuthorArgs
150150
{
151151
public required string Name { get; init; }

examples/MySqlConnectorDapperExample/request.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@
609609
"filename": "query.sql"
610610
},
611611
{
612-
"text": "SELECT id, name, bio FROM authors ORDER BY name",
612+
"text": "SELECT id, name, bio FROM authors\nORDER BY name",
613613
"name": "ListAuthors",
614614
"cmd": ":many",
615615
"columns": [
@@ -812,7 +812,7 @@
812812
"filename": "query.sql"
813813
},
814814
{
815-
"text": "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE(?, '%')",
815+
"text": "SELECT id, name, bio FROM authors\nWHERE name LIKE COALESCE(?, '%')",
816816
"name": "GetAuthorByNamePattern",
817817
"cmd": ":many",
818818
"columns": [
@@ -872,7 +872,7 @@
872872
"filename": "query.sql"
873873
},
874874
{
875-
"text": "DELETE FROM authors WHERE name = ?",
875+
"text": "DELETE FROM authors\nWHERE name = ?",
876876
"name": "DeleteAuthor",
877877
"cmd": ":exec",
878878
"parameters": [

examples/MySqlConnectorDapperLegacyExample/QuerySql.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ public async Task<GetAuthorRow> GetAuthor(GetAuthorArgs args)
5050
}
5151
}
5252

53-
private const string ListAuthorsSql = "SELECT id, name, bio FROM authors ORDER BY name; SELECT LAST_INSERT_ID()";
53+
private const string ListAuthorsSql = "SELECT id, name, bio FROM authors ORDER BY name ; SELECT LAST_INSERT_ID ( ) ";
5454
public class ListAuthorsRow
5555
{
5656
public long Id { get; set; }
@@ -124,7 +124,7 @@ public async Task<GetAuthorByIdRow> GetAuthorById(GetAuthorByIdArgs args)
124124
}
125125
}
126126

127-
private const string GetAuthorByNamePatternSql = "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE(@name_pattern, '%'); SELECT LAST_INSERT_ID()";
127+
private const string GetAuthorByNamePatternSql = "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE ( @name_pattern , '%' ) ; SELECT LAST_INSERT_ID ( ) ";
128128
public class GetAuthorByNamePatternRow
129129
{
130130
public long Id { get; set; }
@@ -146,7 +146,7 @@ public async Task<List<GetAuthorByNamePatternRow>> GetAuthorByNamePattern(GetAut
146146
}
147147
}
148148

149-
private const string DeleteAuthorSql = "DELETE FROM authors WHERE name = @name; SELECT LAST_INSERT_ID()";
149+
private const string DeleteAuthorSql = "DELETE FROM authors WHERE name = @name ; SELECT LAST_INSERT_ID ( ) ";
150150
public class DeleteAuthorArgs
151151
{
152152
public string Name { get; set; }

examples/MySqlConnectorDapperLegacyExample/request.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@
609609
"filename": "query.sql"
610610
},
611611
{
612-
"text": "SELECT id, name, bio FROM authors ORDER BY name",
612+
"text": "SELECT id, name, bio FROM authors\nORDER BY name",
613613
"name": "ListAuthors",
614614
"cmd": ":many",
615615
"columns": [
@@ -812,7 +812,7 @@
812812
"filename": "query.sql"
813813
},
814814
{
815-
"text": "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE(?, '%')",
815+
"text": "SELECT id, name, bio FROM authors\nWHERE name LIKE COALESCE(?, '%')",
816816
"name": "GetAuthorByNamePattern",
817817
"cmd": ":many",
818818
"columns": [
@@ -872,7 +872,7 @@
872872
"filename": "query.sql"
873873
},
874874
{
875-
"text": "DELETE FROM authors WHERE name = ?",
875+
"text": "DELETE FROM authors\nWHERE name = ?",
876876
"name": "DeleteAuthor",
877877
"cmd": ":exec",
878878
"parameters": [

examples/MySqlConnectorExample/QuerySql.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ public QuerySql(string connectionString)
5454
return null;
5555
}
5656

57-
private const string ListAuthorsSql = "SELECT id, name, bio FROM authors ORDER BY name";
57+
private const string ListAuthorsSql = "SELECT id, name, bio FROM authors ORDER BY name ";
5858
public readonly record struct ListAuthorsRow(long Id, string Name, string? Bio);
5959
public async Task<List<ListAuthorsRow>> ListAuthors()
6060
{
@@ -140,7 +140,7 @@ public async Task<long> CreateAuthorReturnId(CreateAuthorReturnIdArgs args)
140140
return null;
141141
}
142142

143-
private const string GetAuthorByNamePatternSql = "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE(@name_pattern, '%')";
143+
private const string GetAuthorByNamePatternSql = "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE ( @name_pattern , '%' ) ";
144144
public readonly record struct GetAuthorByNamePatternRow(long Id, string Name, string? Bio);
145145
public readonly record struct GetAuthorByNamePatternArgs(string? NamePattern);
146146
public async Task<List<GetAuthorByNamePatternRow>> GetAuthorByNamePattern(GetAuthorByNamePatternArgs args)
@@ -165,7 +165,7 @@ public async Task<List<GetAuthorByNamePatternRow>> GetAuthorByNamePattern(GetAut
165165
}
166166
}
167167

168-
private const string DeleteAuthorSql = "DELETE FROM authors WHERE name = @name";
168+
private const string DeleteAuthorSql = "DELETE FROM authors WHERE name = @name ";
169169
public readonly record struct DeleteAuthorArgs(string Name);
170170
public async Task DeleteAuthor(DeleteAuthorArgs args)
171171
{

examples/MySqlConnectorExample/request.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@
609609
"filename": "query.sql"
610610
},
611611
{
612-
"text": "SELECT id, name, bio FROM authors ORDER BY name",
612+
"text": "SELECT id, name, bio FROM authors\nORDER BY name",
613613
"name": "ListAuthors",
614614
"cmd": ":many",
615615
"columns": [
@@ -812,7 +812,7 @@
812812
"filename": "query.sql"
813813
},
814814
{
815-
"text": "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE(?, '%')",
815+
"text": "SELECT id, name, bio FROM authors\nWHERE name LIKE COALESCE(?, '%')",
816816
"name": "GetAuthorByNamePattern",
817817
"cmd": ":many",
818818
"columns": [
@@ -872,7 +872,7 @@
872872
"filename": "query.sql"
873873
},
874874
{
875-
"text": "DELETE FROM authors WHERE name = ?",
875+
"text": "DELETE FROM authors\nWHERE name = ?",
876876
"name": "DeleteAuthor",
877877
"cmd": ":exec",
878878
"parameters": [

examples/MySqlConnectorLegacyExample/QuerySql.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ public async Task<GetAuthorRow> GetAuthor(GetAuthorArgs args)
6363
return null;
6464
}
6565

66-
private const string ListAuthorsSql = "SELECT id, name, bio FROM authors ORDER BY name";
66+
private const string ListAuthorsSql = "SELECT id, name, bio FROM authors ORDER BY name ";
6767
public class ListAuthorsRow
6868
{
6969
public long Id { get; set; }
@@ -171,7 +171,7 @@ public async Task<GetAuthorByIdRow> GetAuthorById(GetAuthorByIdArgs args)
171171
return null;
172172
}
173173

174-
private const string GetAuthorByNamePatternSql = "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE(@name_pattern, '%')";
174+
private const string GetAuthorByNamePatternSql = "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE ( @name_pattern , '%' ) ";
175175
public class GetAuthorByNamePatternRow
176176
{
177177
public long Id { get; set; }
@@ -204,7 +204,7 @@ public async Task<List<GetAuthorByNamePatternRow>> GetAuthorByNamePattern(GetAut
204204
}
205205
}
206206

207-
private const string DeleteAuthorSql = "DELETE FROM authors WHERE name = @name";
207+
private const string DeleteAuthorSql = "DELETE FROM authors WHERE name = @name ";
208208
public class DeleteAuthorArgs
209209
{
210210
public string Name { get; set; }

examples/MySqlConnectorLegacyExample/request.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -609,7 +609,7 @@
609609
"filename": "query.sql"
610610
},
611611
{
612-
"text": "SELECT id, name, bio FROM authors ORDER BY name",
612+
"text": "SELECT id, name, bio FROM authors\nORDER BY name",
613613
"name": "ListAuthors",
614614
"cmd": ":many",
615615
"columns": [
@@ -812,7 +812,7 @@
812812
"filename": "query.sql"
813813
},
814814
{
815-
"text": "SELECT id, name, bio FROM authors WHERE name LIKE COALESCE(?, '%')",
815+
"text": "SELECT id, name, bio FROM authors\nWHERE name LIKE COALESCE(?, '%')",
816816
"name": "GetAuthorByNamePattern",
817817
"cmd": ":many",
818818
"columns": [
@@ -872,7 +872,7 @@
872872
"filename": "query.sql"
873873
},
874874
{
875-
"text": "DELETE FROM authors WHERE name = ?",
875+
"text": "DELETE FROM authors\nWHERE name = ?",
876876
"name": "DeleteAuthor",
877877
"cmd": ":exec",
878878
"parameters": [

0 commit comments

Comments
 (0)