core

package
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 15, 2025 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

internal/core/validation.go

Index

Constants

This section is empty.

Variables

View Source
var AllowedColumnTypes = map[string]string{
	"TEXT":    "TEXT",
	"INTEGER": "INTEGER",
	"REAL":    "REAL",
	"BLOB":    "BLOB",
	"BOOLEAN": "BOOLEAN",
}

Allowed SQLite column types for user definition (uppercase keys and values)

Functions

func IsValidIdentifier

func IsValidIdentifier(name string) bool

IsValidIdentifier checks if a string is a valid identifier (e.g., db_name, table_name, column_name) Applies basic format and length checks.

func NormalizeAndValidateType

func NormalizeAndValidateType(colType string) (string, bool)

NormalizeAndValidateType checks if a string is an allowed column type, returning the normalized uppercase version.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL