• lelgenio@lemmy.ml
    link
    fedilink
    arrow-up
    0
    ·
    edit-2
    1 year ago
    CREATE TABLE display (
        id INT PRIMARY KEY,
        display_property TEXT
    );
    
    INSERT INTO display (id, display_property)
    VALUES
    (1, 'block'),
    (2, 'inline-block'),
    (3, 'flex');
    
    CREATE TABLE divs (
        id INT PRIMARY KEY,
        inner_html TEXT,
        display INT REFERENCES display(id)
    );
    
    INSERT INTO divs (id, inner_html , display)
    VALUES
    (1, 'div1', 1),
    (2, 'div2', 2),
    (3, 'div3', 3);
    
    • lelgenio@lemmy.ml
      link
      fedilink
      arrow-up
      0
      ·
      1 year ago
      .users {
        id: int !primary-key;
        name: text;
      }
      
      .users::insert {
        id: 1;
        name: "John doe";
      }
      
      @query (max: 10) {
        .user {
          display: table;
        }
        .users id {
          display: none;
        }
      }