Esempio n. 1
0
        public StyleFinder(MySqlConnection conn)
        {
            cmdSelectStyle = new MySqlCommand("SELECT * FROM `styles` WHERE `style` = @style;", conn);
            cmdSelectStyle.Prepare();
            cmdSelectStyle.Parameters.Add("style", MySqlDbType.MediumText);

            cmdInsertStyle = new InsertBuilder(conn, "styles")
                             .AddString("style")
                             .Build();
        }
Esempio n. 2
0
        public GenreFinder(MySqlConnection conn)
        {
            cmdSelectGenre = new MySqlCommand("SELECT * FROM `genres` WHERE `genre` = @genre;", conn);
            cmdSelectGenre.Prepare();
            cmdSelectGenre.Parameters.Add("genre", MySqlDbType.MediumText);

            cmdInsertGenre = new InsertBuilder(conn, "genres")
                             .AddString("genre")
                             .Build();
        }
Esempio n. 3
0
        protected override void Init()
        {
            base.Init();

            this.cmdMaster = new InsertBuilder(conn, "masters")
                             .AddInt32("id")
                             .AddInt32("main_release")
                             .AddString("title")
                             .AddString("joined_artists")
                             .AddInt32("year")
                             .AddString("notes")
                             .Build();
        }
Esempio n. 4
0
        private void Init()
        {
            cmdArtist = new InsertBuilder(this.conn, "artists")
                        .AddString("name")
                        .AddString("realname")
                        .AddString("profile")
                        .Build();

            cmdAlias = new InsertBuilder(this.conn, "artists_aliases")
                       .AddInt32("artist")
                       .AddInt32("number")
                       .AddString("alias")
                       .Build();

            cmdNameVariation = new InsertBuilder(this.conn, "artists_namevariations")
                               .AddInt32("artist")
                               .AddInt32("number")
                               .AddString("namevariation")
                               .Build();

            cmdUrl = new InsertBuilder(this.conn, "artists_urls")
                     .AddInt32("artist")
                     .AddInt32("number")
                     .AddString("url")
                     .Build();

            cmdImage = new InsertBuilder(this.conn, "artists_images")
                       .AddInt32("artist")
                       .AddInt32("number")
                       .AddString("type")
                       .AddInt32("width")
                       .AddInt32("height")
                       .AddString("uri")
                       .AddString("uri150")
                       .Build();

            cmdGroup = new InsertBuilder(this.conn, "artists_groups")
                       .AddInt32("artist")
                       .AddInt32("number")
                       .AddString("group")
                       .Build();

            cmdMember = new InsertBuilder(this.conn, "artists_members")
                        .AddInt32("artist")
                        .AddInt32("number")
                        .AddString("member")
                        .Build();
        }
Esempio n. 5
0
        protected virtual void Init()
        {
            this.genreFinder = new GenreFinder(this.conn);
            this.styleFinder = new StyleFinder(this.conn);

            this.cmdRelease = new InsertBuilder(conn, "releases")
                              .AddInt32("id")
                              .AddString("master_id")
                              .AddString("status")
                              .AddString("title")
                              .AddString("joined_artists")
                              .AddString("country")
                              .AddString("releasedate")
                              .AddString("notes")
                              .Build();

            this.cmdReleaseArtist = new InsertBuilder(conn, "releases_artists")
                                    .AddInt32("release")
                                    .AddInt32("master")
                                    .AddInt32("number")
                                    .AddInt32("artist")
                                    .AddString("namevariation")
                                    .AddString("join")
                                    .Build();

            this.cmdReleaseFormat = new InsertBuilder(conn, "releases_formats")
                                    .AddInt32("release")
                                    .AddInt32("number")
                                    .AddString("name")
                                    .AddInt32("quantity")
                                    .Build();

            this.cmdReleaseFormatDescription = new InsertBuilder(conn, "releases_formats_descriptions")
                                               .AddInt32("release_format")
                                               .AddInt32("number")
                                               .AddString("description")
                                               .Build();

            this.cmdReleaseGenre = new InsertBuilder(conn, "releases_genres")
                                   .AddInt32("release")
                                   .AddInt32("master")
                                   .AddInt32("number")
                                   .AddInt32("genre")
                                   .Build();

            this.cmdReleaseImage = new InsertBuilder(conn, "releases_images")
                                   .AddInt32("release")
                                   .AddInt32("master")
                                   .AddInt32("number")
                                   .AddString("type")
                                   .AddInt32("width")
                                   .AddInt32("height")
                                   .AddString("uri")
                                   .AddString("uri150")
                                   .Build();

            this.cmdReleaseLabel = new InsertBuilder(conn, "releases_labels")
                                   .AddInt32("release")
                                   .AddInt32("number")
                                   .AddString("catno")
                                   .AddString("name")
                                   .Build();

            this.cmdReleaseIdentifier = new InsertBuilder(conn, "releases_identifiers")
                                        .AddInt32("release")
                                        .AddInt32("number")
                                        .AddString("type")
                                        .AddString("value")
                                        .AddString("description")
                                        .Build();

            this.cmdReleaseStyle = new InsertBuilder(conn, "releases_styles")
                                   .AddInt32("release")
                                   .AddInt32("master")
                                   .AddInt32("number")
                                   .AddInt32("style")
                                   .Build();

            this.cmdReleaseTrack = new InsertBuilder(conn, "releases_tracks")
                                   .AddInt32("release")
                                   .AddInt32("master")
                                   .AddInt32("number")
                                   .AddString("position")
                                   .AddString("title")
                                   .AddInt32("duration")
                                   .Build();

            this.cmdReleaseTrackArtist = new InsertBuilder(conn, "releases_tracks_artists")
                                         .AddInt32("track")
                                         .AddInt32("number")
                                         .AddString("artist")
                                         .AddString("namevariation")
                                         .AddString("join")
                                         .Build();

            this.cmdReleaseTrackExtraArtist = new InsertBuilder(conn, "releases_tracks_extraartists")
                                              .AddInt32("track")
                                              .AddInt32("number")
                                              .AddString("name")
                                              .AddString("namevariation")
                                              .AddString("role")
                                              .Build();

            this.cmdReleaseFts = new InsertBuilder(conn, "releases_fts")
                                 .AddInt32("id")
                                 .AddString("fts")
                                 .Build();

            Console.WriteLine("Creating ArtistFinder...");
            this.artistFinder = new ArtistFinder(this.conn);
        }