ihp icon indicating copy to clipboard operation
ihp copied to clipboard

1601 default vals

Open tobz619 opened this issue 1 year ago • 11 comments

I've figured out the pull request:

I've got quite a few to go but hopefully the strategy I'm going for is apparent and is helpful to you.

If you have any thoughts on some other things or style comments then let me know and I'll try and incorporate them. I'll do the rest of these tomorrow

tobz619 avatar Mar 25 '23 22:03 tobz619

I think one of the tests is incorrect:

it "should parse a CREATE TABLE with REAL, FLOAT4, DOUBLE, FLOAT8 columns" do
            parseSql "CREATE TABLE bools (a REAL, b FLOAT4, c DOUBLE PRECISION, d FLOAT8);" 
                `shouldBe` StatementCreateTable realFloatTable

I think its name should be something other than bools. I will change the name to realfloat so it passes the test

tobz619 avatar Mar 26 '23 18:03 tobz619

I have work tomorrow and plans in the evening so I will have to pick it up again on Tuesday to complete everything else. Or at least I hope what is currently here is enough for someone to take and complete! this is fun :)

tobz619 avatar Mar 26 '23 18:03 tobz619

As an aside, do you know why the CI checks are unsuccessful? I want to make sure this is not an issue by the time I'm done. I'm following the Contributing.md as close as I can!

tobz619 avatar Mar 27 '23 10:03 tobz619

Just checked it. Newly added modules need to be added to the ihp.cabal file in the project, otherwise the linker fails when building IHP. Basically the linker cannot find the function implementations for defCreateTable etc. because the module has has not been part of the build process. To fix this, add the missing module to ihp.cabal and then everything should work 👍

mpscholten avatar Mar 27 '23 13:03 mpscholten

I believe this is now ready for review. Hopefully this helps and gives a variety of options and approaches :)

tobz619 avatar Mar 28 '23 17:03 tobz619

Okay should all now be complete :)

tobz619 avatar Mar 29 '23 17:03 tobz619

I've been a bit busy so haven't been able to rewrite the tests but I have time to do so tomorrow evening :)

tobz619 avatar Apr 04 '23 19:04 tobz619

Great, thanks for the update! Happy to review again later today 👍

mpscholten avatar Apr 05 '23 06:04 mpscholten

Is this ready for review again? :)

mpscholten avatar Apr 11 '23 17:04 mpscholten

Is this ready for review again? :)

Not yet, hopefully by the end of tonight! :)

I must admit my motivation to rewrite to instances of emptyTable and emptyColumn is low but I'll get it done

tobz619 avatar Apr 13 '23 19:04 tobz619

I think, I'm done with this here:

Rewriting instances of defaultCreateTablePKID will take a long time and I feel it does its job and I need to move onto other things.

tobz619 avatar Apr 14 '23 21:04 tobz619