# `AshScylla.DataLayer.SchemaUtils`
[🔗](https://github.com/ohhi-vn/ash_scylla/blob/main/lib/ash_scylla/data_layer/schema_utils.ex#L15)

Shared schema utilities for table names, column analysis, and identifier quoting.

Centralizes functions that were previously duplicated across
`AshScylla.DataLayer.SchemaMigration`, `AshScylla.Migration`,
`AshScylla.DataLayer.MaterializedView`, and `AshScylla.ResourceGenerator`.

# `get_table_name`

```elixir
@spec get_table_name(module()) :: String.t()
```

Returns the table name for a resource.

Checks the DSL `table/1` config first, then falls back to deriving
from the module name (using domain prefix if available).

# `quote_name`

```elixir
@spec quote_name(atom() | String.t()) :: String.t() | no_return()
```

Quotes a CQL identifier (table name, column name, etc.) for safe use in CQL strings.

Uses double-quote escaping per CQL spec. Delegates validation to
`AshScylla.Identifier.validate/1`.

# `quote_name_unchecked`

```elixir
@spec quote_name_unchecked(String.t()) :: String.t()
```

# `sanitize_type_name`

```elixir
@spec sanitize_type_name(String.t() | atom()) :: String.t()
```

Resolves a type name for a UDT, sanitizing it for safe CQL interpolation.

# `unindexable_columns`

```elixir
@spec unindexable_columns(module()) :: [atom()]
```

Returns the list of columns that cannot have secondary indexes.

Currently this is only the sole partition key column (ScyllaDB forbids it).
Returns an empty list for composite partition keys or resources without
a clear single partition key.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
