Documentation
¶
Overview ¶
tongue-demon. A cli tool to generate go code from your sql code. Copyright (C) 2020 Rotten Network
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
tongue-demon. A cli tool to generate go code from your sql code. Copyright (C) 2020 Rotten Network
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
tongue-demon. A cli tool to generate go code from your sql code. Copyright (C) 2020 Rotten Network
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
tongue-demon. A cli tool to generate go code from your sql code. Copyright (C) 2020 Rotten Network
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
tongue-demon. A cli tool to generate go code from your sql code. Copyright (C) 2020 Rotten Network
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
tongue-demon. A cli tool to generate go code from your sql code. Copyright (C) 2020 Rotten Network
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
tongue-demon. A cli tool to generate go code from your sql code. Copyright (C) 2020 Rotten Network
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
tongue-demon. A cli tool to generate go code from your sql code. Copyright (C) 2020 Rotten Network
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
tongue-demon. A cli tool to generate go code from your sql code. Copyright (C) 2020 Rotten Network
This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
- Constants
- func Generate(args Args) error
- type Args
- type Method
- type Model
- type Relation
- type Repository
- func (r *Repository) Add(m *Model)
- func (r *Repository) GetModelByName(name string) *Model
- func (r *Repository) GetModels() []*Model
- func (r *Repository) LoadModels(models []*Model)
- func (r *Repository) ReferencedBy(m *Model) []*Model
- func (r *Repository) References(m *Model) []*Model
- func (r *Repository) Relation(relation *Relation)
- type SqlSourceFiles
Constants ¶
const ( ConfigInterface = `` /* 136-byte string literal not displayed */ Implementation = `` /* 977-byte string literal not displayed */ InitTables = `` /* 197-byte string literal not displayed */ MethodDefinition = `` /* 129-byte string literal not displayed */ MethodTemplate = `` /* 1049-byte string literal not displayed */ Utils = `` /* 2734-byte string literal not displayed */ )
const (
MySQLTestSchema = `` /* 709-byte string literal not displayed */
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Args ¶
type Method ¶
type Model ¶
type Model struct { Table *statement.Table Columns []*statement.Column // contains filtered or unexported fields }
func NewModel ¶
type Relation ¶
type Relation struct { Type statement.RelationType // contains filtered or unexported fields }
type Repository ¶
type Repository struct {
*simple.DirectedGraph
}
func NewRepository ¶
func NewRepository(models []*Model) *Repository
func (*Repository) Add ¶
func (r *Repository) Add(m *Model)
func (*Repository) GetModelByName ¶
func (r *Repository) GetModelByName(name string) *Model
func (*Repository) GetModels ¶
func (r *Repository) GetModels() []*Model
func (*Repository) LoadModels ¶
func (r *Repository) LoadModels(models []*Model)
func (*Repository) ReferencedBy ¶
func (r *Repository) ReferencedBy(m *Model) []*Model
func (*Repository) References ¶
func (r *Repository) References(m *Model) []*Model
func (*Repository) Relation ¶
func (r *Repository) Relation(relation *Relation)