Skip to content

sromku/datastore-to-sql

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation


Run it yourself

go get -u github.com/sromku/datastore-to-sql/backup

Load the backup file into model

This script will load the backup file into 'Profile' model and print it

import (
	"fmt"
	"github.com/sromku/datastore-to-sql/backup"
)

func main() {
	backupPath := ".../output-0"
	backup.Load(backupPath, &Profile{}, nil,
		func(res interface{}) {
			profile, _ := res.(*Profile) // the loaded model
			fmt.Println(profile)
		})
}

type Profile struct {
	Name   string `datastore:"name, noindex"`
	Email  string `datastore:"email"`
	Gender int `datastore:"gender, noindex"`
}

About

Export and migrate your GAE Datastore data to SQL using Golang

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published