sea-query icon indicating copy to clipboard operation
sea-query copied to clipboard

add support for SQLite strict tables

Open evgeniy-terekhin opened this issue 2 years ago • 2 comments

this PR adds support for sqlite strict tables it does so by adding a new variant to TableOpt variant

example: create table test(a, b) (regular create statement) create table test(a int, b int) strict (strict create statement)

Questions

  1. Is TableOpt the right place to put this functionality in?
  2. Does TableOpt have to be public given that there are builder methods for each individual option?
  3. I noticed that TableBuilder::table_prepare_create_statement has only a default impl and TableOpts attempt to be rendered for any backend even though only MySQL (and SQLite starting with this PR) need those? I am pretty sure I understand why it is so (for the sake of code sharing probably) but wouldn't it make sense for each backend to have it's own implementation?

evgeniy-terekhin avatar Oct 31 '22 12:10 evgeniy-terekhin

it might make sense to rewrite this PR in terms of TableModifier introduced in this PR

evgeniy-terekhin avatar Nov 01 '22 10:11 evgeniy-terekhin

@evgeniy-terekhin hello! Sorry with the delay. I think is better split TableOpt into backend specific options, what do you think?

ikrivosheev avatar Jan 10 '23 08:01 ikrivosheev