Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Creating a WITHOUT ROWID table #3330

Closed
P0oOOOo0YA opened this issue Dec 26, 2018 · 1 comment · Fixed by #4688
Closed

Creating a WITHOUT ROWID table #3330

P0oOOOo0YA opened this issue Dec 26, 2018 · 1 comment · Fixed by #4688

Comments

@P0oOOOo0YA
Copy link

Issue type:

[*] question

Database system/driver:
[*] sqlite

TypeORM version:
[*] latest

In SQLite, one can create a WITHOUT ROWID table with the following query.

CREATE TABLE IF NOT EXISTS wordcount(
  word TEXT PRIMARY KEY,
  cnt INTEGER
) WITHOUT ROWID;

What is its equivalent in TypeORM?

@pleerock
Copy link
Member

Its not supported. We can make @Entity to accept this option and use in during query building. Feel free to contribute.

bnegrao added a commit to bnegrao/typeorm that referenced this issue Sep 4, 2019
This new feature adds a 'withoutRowid' option to EntityOptions in order to
enable Sqlite 'WITHOUT ROWID' modifier to the 'CREATE TABLE' statement.
See https://www.sqlite.org/withoutrowid.html

Closes: typeorm#3330
pleerock pushed a commit that referenced this issue Oct 18, 2019
* feat: implements Sqlite 'WITHOUT ROWID' table modifier

This new feature adds a 'withoutRowid' option to EntityOptions in order to
enable Sqlite 'WITHOUT ROWID' modifier to the 'CREATE TABLE' statement.
See https://www.sqlite.org/withoutrowid.html

Closes: #3330

* style: adding semicolon and space complained by linter

adding semicolons and spaces complained by linter
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants