Skip to content

Support 'string' for uidType #83

@derekwsgray

Description

@derekwsgray

I looked through the source of store-sequelize and the sqlHandler had the code I was looking for to support a uidType of string:

switch (relation._settings._uidType) {
    case 'uuid':
      modelProperties.id = {
        type: DataTypes.UUID,
        allowNull: false
      }
      break
    case 'autoincrement':
      modelProperties.id = {
        type: DataTypes.INTEGER,
        allowNull: false,
        get: function () {
          return this.getDataValue('id').toString()
        }
      }
      break
    case 'string': default:
      modelProperties.id = {
        type: DataTypes.STRING,
        allowNull: false
      }
      break
  }

But to my dismay, the joi.one isn't allowing 'string' to pass through and insisting the type must be UUID or auto-increment.

RDF Data is uniquely identified by IRI's, so I need longer than the 38 characters allowed by default.

Thanks!

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