Skip to content
This repository has been archived by the owner on Nov 28, 2019. It is now read-only.

Insert a real record #5

Open
douglascamata opened this issue Mar 25, 2012 · 1 comment
Open

Insert a real record #5

douglascamata opened this issue Mar 25, 2012 · 1 comment

Comments

@douglascamata
Copy link
Member

Should be able to generate SQL to insert a real record into the database. Example:

type Person struct {
    Name string
    Age int
}

newPerson := Person{"Somebody", 99}

insert(newPerson)
@fsouza
Copy link
Contributor

fsouza commented Mar 28, 2012

Are you talking about the SQL generation or the actual record in the database? We're not ready yet to insert stuff in the database, we're just working in the SQL generator.

Once we get there, we shall build an API that may look this:

type Person struct {
    Id int
    Name string
    Age int
}

p := Person{Name:"Francisco", Age:"23"}
s := Session()
s.Insert(p)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants