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

Custom Character Sets #74

Closed
NathanFlurry opened this issue Aug 24, 2016 · 3 comments
Closed

Custom Character Sets #74

NathanFlurry opened this issue Aug 24, 2016 · 3 comments
Labels
enhancement New feature or request
Milestone

Comments

@NathanFlurry
Copy link
Contributor

Feature, Enhancement, or Optimization

Name of Feature

Introduction

People need custom encodings and character sets in their databases to do things such as supporting unicode in MySQL. (Let's be honest here, those very emojis are important.)

Motivation

Fluent need the ability to add custom encodings. I have already added support for reading and writing with custom encodings to all three MySQL libraries.

Proposed solution

Add custom character sets and collations to tables and columns.

Code snippets

A MySQL table with a utf8mb4 encoding on the text column would loo like this:

CREATE TABLE `posts` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `text` varchar(191) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `date` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8

Impact

This will not have any impact on existing code.

Alternatives considered

The alternative it to let users continue altering tables after being created with raw queries.

Decision (For Moderator Use)

On [Date], the community decided to (TBD) this proposal. When the community makes a decision regarding this proposal, their rationale for the decision will be written here.

@tanner0101
Copy link
Member

This is probably different when using different types of SQL right? We need some generic enum that can represent different character encodings then each driver would have to choose whether to support them.

@NathanFlurry NathanFlurry added the enhancement New feature or request label Aug 24, 2016
@tanner0101 tanner0101 removed this from the 0.10 milestone Aug 25, 2016
@tanner0101
Copy link
Member

Moving this to a future version of Fluent.

@BrettRToomey BrettRToomey added this to the 2.0 milestone May 3, 2017
@tanner0101
Copy link
Member

The driver-based solution to this problem seems to be working well. For mysql you can set the encoding in Config/mysql.json, other databases/SQL flavors can follow suit with their own custom encoding types. Closing this for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants