@@ -902,19 +902,21 @@ public async Task TruncateMysqlTypes()
902902 await this . Transaction . Connection . ExecuteAsync ( TruncateMysqlTypesSql , transaction : this . Transaction ) ;
903903 }
904904
905- private const string CreateExtendedBioSql = "INSERT INTO extended.bios (author_name, name, bio_type) VALUES (@author_name, @name, @bio_type)" ;
905+ private const string CreateExtendedBioSql = "INSERT INTO extended.bios (author_name, name, bio_type, author_type ) VALUES (@author_name, @name, @bio_type, @author_type )" ;
906906 public class CreateExtendedBioArgs
907907 {
908908 public string ? AuthorName { get ; init ; }
909909 public string ? Name { get ; init ; }
910910 public ExtendedBiosBioType ? BioType { get ; init ; }
911+ public ExtendedBiosAuthorType [ ] ? AuthorType { get ; init ; }
911912 } ;
912913 public async Task CreateExtendedBio ( CreateExtendedBioArgs args )
913914 {
914915 var queryParams = new Dictionary < string , object ? > ( ) ;
915916 queryParams . Add ( "author_name" , args . AuthorName ) ;
916917 queryParams . Add ( "name" , args . Name ) ;
917918 queryParams . Add ( "bio_type" , args . BioType ) ;
919+ queryParams . Add ( "author_type" , args . AuthorType != null ? string . Join ( "," , args . AuthorType ) : null ) ;
918920 if ( this . Transaction == null )
919921 {
920922 using ( var connection = new MySqlConnection ( ConnectionString ) )
@@ -933,12 +935,13 @@ public async Task CreateExtendedBio(CreateExtendedBioArgs args)
933935 await this . Transaction . Connection . ExecuteAsync ( CreateExtendedBioSql , queryParams , transaction : this . Transaction ) ;
934936 }
935937
936- private const string GetFirstExtendedBioByTypeSql = "SELECT author_name, name, bio_type FROM extended.bios WHERE bio_type = @bio_type LIMIT 1" ;
938+ private const string GetFirstExtendedBioByTypeSql = "SELECT author_name, name, bio_type, author_type FROM extended.bios WHERE bio_type = @bio_type LIMIT 1" ;
937939 public class GetFirstExtendedBioByTypeRow
938940 {
939941 public string ? AuthorName { get ; init ; }
940942 public string ? Name { get ; init ; }
941943 public ExtendedBiosBioType ? BioType { get ; init ; }
944+ public ExtendedBiosAuthorType [ ] ? AuthorType { get ; init ; }
942945 } ;
943946 public class GetFirstExtendedBioByTypeArgs
944947 {
0 commit comments