<commit_before># MySQL Connector

This is an Arrow connector to MySQL.

> This software is pre-release and not yet ready for usage.  Please don't use this just yet while we're working through testing and finishing it up. Once it's ready, we'll make an announcement about it.

To install:

```bash
$ appc install connector/appc.mysql --save
```

By default we use `localhost`, `root` and empty password.

However, you must set a database in your configuration.

Now reference the connector in your model.

```javascript
var Account = Arrow.Model.extend('Account',{
	fields: {
		Name: { type: String, required: true, validator: /[a-zA-Z]{3,}/ }
	},
	connector: 'appc.mysql'
});
```

If you want to map a specific model to a specific table, use metadata.  For example, to map the `account` model to the table named `accounts`, set it such as:

```javascript
var Account = Arrow.Model.extend('account',{
	fields: {
		Name: { type: String, required: false, validator: /[a-zA-Z]{3,}/ }
	},
	connector: 'appc.mysql',
	metadata: {
		'appc.mysql': {
			table: 'accounts'
		}
	}
});
```

# Testing

To use the tests, you'll want to create a database with the following tables:

```
CREATE TABLE post
(
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	title VARCHAR(255),
	content VARCHAR(255)
);
CREATE TABLE super_post
(
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	title VARCHAR(255),
	content VARCHAR(255)
);
CREATE TABLE employee
(
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	first_name VARCHAR(255),
	last_name VARCHAR(255),
	email_address VARCHAR(255)<commit_msg>Changed to Postgres in readme<commit_after># Postgres Connector

This is an Arrow connector to Postgres.

> This software is pre-release and not yet ready for usage.  Please don't use this just yet while we're working through testing and finishing it up. Once it's ready, we'll make an announcement about it.

To install:

```bash
$ appc install connector/appc.postgres --save
```

By default we use `localhost`, `root` and empty password.

However, you must set a database in your configuration.

Now reference the connector in your model.

```javascript
var Account = Arrow.Model.extend('Account',{
	fields: {
		Name: { type: String, required: true, validator: /[a-zA-Z]{3,}/ }
	},
	connector: 'appc.postgres'
});
```

If you want to map a specific model to a specific table, use metadata.  For example, to map the `account` model to the table named `accounts`, set it such as:

```javascript
var Account = Arrow.Model.extend('account',{
	fields: {
		Name: { type: String, required: false, validator: /[a-zA-Z]{3,}/ }
	},
	connector: 'appc.postgres',
	metadata: {
		'appc.postgres': {
			table: 'accounts'
		}
	}
});
```

# Testing

To use the tests, you'll want to create a database with the following tables:

```
CREATE TABLE post
(
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	title VARCHAR(255),
	content VARCHAR(255)
);
CREATE TABLE super_post
(
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	title VARCHAR(255),
	content VARCHAR(255)
);
CREATE TABLE employee
(
	id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
	first_name VARCHAR(255),
	last_name VARCHAR(255),
	email_address VARCHAR(255)
{'fraction_non_alphanumeric': 0.11230964467005077, 'fraction_numerical': 0.014593908629441625, 'mean_word_length': 4.28140703517588, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1934027', 'n_tokens_mistral': 1099, 'n_tokens_neox': 991, 'n_words': 397}