<commit_before>﻿using Marten.Generation;
using Shouldly;

namespace Marten.Testing.Generation
{
    public class SchemaBuilderTests
    {
        public void table_name_for_document()
        {
            SchemaBuilder.TableNameFor(typeof(MySpecialDocument))
                .ShouldBe("mt_doc_MySpecialDocument");
        }

        public class MySpecialDocument { }
    }
}<commit_msg>initial code to write sql for creating a document table<commit_after>﻿using Marten.Generation;
using Shouldly;

namespace Marten.Testing.Generation
{
    public class SchemaBuilderTests
    {
        public void table_name_for_document()
        {
            SchemaBuilder.TableNameFor(typeof(MySpecialDocument))
                .ShouldBe("mt_doc_MySpecialDocument");
        }

        public void write_document_table()
        {
            var builder = new SchemaBuilder();
            builder.CreateTable(typeof(MySpecialDocument));

            var sql = builder.ToSql();

            sql.ShouldContain("CREATE TABLE mt_doc_MySpecialDocument");
            sql.ShouldContain("json NOT NULL");
        }

        public class MySpecialDocument { }
    }
}
{'fraction_non_alphanumeric': 0.0791304347826087, 'fraction_numerical': 0.0, 'mean_word_length': 2.5091463414634148, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2007940', 'n_tokens_mistral': 299, 'n_tokens_neox': 290, 'n_words': 60}