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

draft: drop table implementation #1022

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

someshkoli
Copy link

@someshkoli someshkoli commented Feb 16, 2025

Closes #894, duplicate, had picked it up over weekend, didn't realise a pr was raised post that

has

  • schema update for deleted table
  • all statement and instructions wiring

missing

limbo> 
limbo>  create table temp(a int, b int);
        insert into temp values(1,1);
        insert into temp values(2,2);
limbo> explain drop table temp;
addr  opcode             p1    p2    p3    p4             p5  comment
----  -----------------  ----  ----  ----  -------------  --  -------
0     Init               0     18    0                    0   Start at 18
1     Null               0     1     0                    0   r[1]=NULL
2     OpenWriteAsync     0     1     0                    0   
3     OpenWriteAwait     0     0     0                    0   
4     RewindAsync        0     0     0                    0   
5     RewindAwait        0     15    0                    0   Rewind table sqlite_schema
6       Column           0     2     1                    0   r[1]=sqlite_schema.tbl_name
7       Ne               1     2     13                   0   if r[1]!=r[2] goto 13
8       Column           0     0     3                    0   r[3]=sqlite_schema.type
9       Eq               3     4     13                   0   if r[3]==r[4] goto 13
10      RowId            0     5     0                    0   r[5]=sqlite_schema.rowid
11      DeleteAsync      0     0     0                    0   
12      DeleteAwait      0     0     0                    0   
13    NextAsync          0     0     0                    0   
14    NextAwait          0     6     0                    0   
15    DestroyAsync       2     2     0                    0   
16    DestroyAwait       2     2     0                    0   
17    Halt               0     0     0                    0   
18    Transaction        0     0     0                    0   
19    String8            0     2     0     temp           0   r[2]='temp'
20    String8            0     4     0     trigger        0   r[4]='trigger'
21    Goto               0     2     0                    0   

has
- schema update for deleted table
- all statement and instructions wiring

missing
- destroy table implemenattion
- table dependency clearance, requires temporary table for storing
  intermediatery results
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DROP TABLE support
1 participant