82 lines
2.4 KiB
Go

//
// Code generated by go-jet DO NOT EDIT.
//
// WARNING: Changes to this file may cause incorrect behavior
// and will be lost if the code is regenerated
//
package table
import (
"github.com/go-jet/jet/v2/postgres"
)
var SystemPrompts = newSystemPromptsTable("agents", "system_prompts", "")
type systemPromptsTable struct {
postgres.Table
// Columns
ID postgres.ColumnString
Prompt postgres.ColumnString
AgentID postgres.ColumnString
AllColumns postgres.ColumnList
MutableColumns postgres.ColumnList
}
type SystemPromptsTable struct {
systemPromptsTable
EXCLUDED systemPromptsTable
}
// AS creates new SystemPromptsTable with assigned alias
func (a SystemPromptsTable) AS(alias string) *SystemPromptsTable {
return newSystemPromptsTable(a.SchemaName(), a.TableName(), alias)
}
// Schema creates new SystemPromptsTable with assigned schema name
func (a SystemPromptsTable) FromSchema(schemaName string) *SystemPromptsTable {
return newSystemPromptsTable(schemaName, a.TableName(), a.Alias())
}
// WithPrefix creates new SystemPromptsTable with assigned table prefix
func (a SystemPromptsTable) WithPrefix(prefix string) *SystemPromptsTable {
return newSystemPromptsTable(a.SchemaName(), prefix+a.TableName(), a.TableName())
}
// WithSuffix creates new SystemPromptsTable with assigned table suffix
func (a SystemPromptsTable) WithSuffix(suffix string) *SystemPromptsTable {
return newSystemPromptsTable(a.SchemaName(), a.TableName()+suffix, a.TableName())
}
func newSystemPromptsTable(schemaName, tableName, alias string) *SystemPromptsTable {
return &SystemPromptsTable{
systemPromptsTable: newSystemPromptsTableImpl(schemaName, tableName, alias),
EXCLUDED: newSystemPromptsTableImpl("", "excluded", ""),
}
}
func newSystemPromptsTableImpl(schemaName, tableName, alias string) systemPromptsTable {
var (
IDColumn = postgres.StringColumn("id")
PromptColumn = postgres.StringColumn("prompt")
AgentIDColumn = postgres.StringColumn("agent_id")
allColumns = postgres.ColumnList{IDColumn, PromptColumn, AgentIDColumn}
mutableColumns = postgres.ColumnList{PromptColumn, AgentIDColumn}
)
return systemPromptsTable{
Table: postgres.NewTable(schemaName, tableName, alias, allColumns...),
//Columns
ID: IDColumn,
Prompt: PromptColumn,
AgentID: AgentIDColumn,
AllColumns: allColumns,
MutableColumns: mutableColumns,
}
}