Skip to content

SQL non standard issues #69

@alelopezperez

Description

@alelopezperez

From what i've investigated it seems that there a some particularies in the serialization of a sql statement, that come into conflict with MySql(I'm developing support for MySql)

From what I gathered
1) Quoted table names from toasty/src/core/src/stm/sql/serialize.rs this is not supported in MySql FIXED

  fn ident_str(&mut self, ident: &str) -> fmt::Result {
        write!(self.dst, "\"{ident}\"")?;
        Ok(())
    }
}
  1. Since toasty uses TEXT type for ID, in MySQL it should be sized
    CREATE TABLE users (id TEXT, name INTEGER, email TEXT, moto TEXT, PRIMARY KEY (id)); => ERROR 1170 (42000) at line 1: BLOB/TEXT column 'id' used in key specification without a key length

It should be something like this
CREATE TABLE usuarios (id TEXT, name INTEGER, email TEXT, moto TEXT, PRIMARY KEY (id(11)));

  1. RETURNING clause in mysql only works for INSERT, DELETE and REPLACE but not for UPDATE
    medium_article_evidence
    stackoverflow_question
    mariadb_docs

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions