Ejemplo n.º 1
0
        static void InsertWarned(NpgsqlConnection conn, long testRunSetId, string benchmark, bool faster)
        {
            PostgresRow row = new PostgresRow();

            row.Set("runSet", NpgsqlTypes.NpgsqlDbType.Bigint, testRunSetId);
            row.Set("benchmark", NpgsqlTypes.NpgsqlDbType.Varchar, benchmark);
            row.Set("faster", NpgsqlTypes.NpgsqlDbType.Boolean, faster);
            PostgresInterface.Insert <long> (conn, "RegressionsWarned", row, "id");
        }
Ejemplo n.º 2
0
        static void InsertWarned(NpgsqlConnection conn, long testRunSetId, string benchmark, bool faster)
        {
            var whereValues = new PostgresRow();

            whereValues.Set("name", NpgsqlTypes.NpgsqlDbType.Varchar, benchmark);
            var  rows        = PostgresInterface.Select(conn, "benchmark", new string[] { "id" }, "name = :name", whereValues);
            long benchmarkId = rows.First().GetValue <long> ("id").Value;

            var row = new PostgresRow();

            row.Set("runSet", NpgsqlTypes.NpgsqlDbType.Bigint, testRunSetId);
            row.Set("benchmark", NpgsqlTypes.NpgsqlDbType.Bigint, benchmarkId);
            row.Set("faster", NpgsqlTypes.NpgsqlDbType.Boolean, faster);
            PostgresInterface.Insert <long> (conn, "RegressionsWarned", row, "id");
        }