Meteor local vs. admin databases - meteor

Where can I find documentation about the difference between Meteor's local and admin DB? I am trying to insert an object into an existing collection from a python script, but I am unsure whether I should insert into local db or admin db.

The MongoDB docs have this information
http://docs.mongodb.org/manual/reference/local-database/
and
http://docs.mongodb.org/manual/reference/system-collections/
Are probably good places to start.

Related

How to turn on Diagnostic Full-text Query for Cosmos Db with ARM template, CLI or PowerShell

I need to turn on Cosmos Db Diagnostic Full-text Query as part of deployment pipeline. Ideally would prefer this being part of ARM template, if not then CLI or PowerShell would do. Couldn't find any documentation on this, has anybody had it done?
I also had exported ARM template for the Cosmos Db account with this setting On in portal, couldn't find anything relevant in the template so redeployed the template and the setting was Off when deployed.
Thanks in advance!

Why does my deployment have no data but my preview has all the data?

My preview works and has data but my deployment has no data. I'm using the (Recommended) DEFAULT CLOUD SQL database configuration.
Note: This is only day 4 with Google App Maker. Finding answers to App Maker-specific questions has been super difficult, but I'm making rapid progress on my application, so overall tired but good. :{)
As written in the documentation,
App Maker deployments can use the same Cloud SQL instance, but have separate databases on that instance. Data that you had in preview mode is not available in other deployments. You have a few options for how to handle this situation:
To use data from the preview instance in your published deployment, export the deployment data from the preview instance and import it to the published deployment.
To share a database across all deployments (preview and published), use a custom Cloud SQL database.
When you deploy your app, AppMaker create a new database in your google cloud SQL instance for the deployment. All the data create in previews is in another database.
To use the same database as the preview mode you have to go in the settings of your app in the tab "DATABASE" and copy the Database Key. Then go to your cloud sql instance in google cloud platforme and on the details of the instance in the overview tab just copy the instance connexion name.
then edit your deployments and select "Use Custom Cloud SQL database" and copy with the format
"instanceConnexionName/DatabaseKey" then save and appmaker should ask you to enter you username and password of your google cloud sql insatnce.
On app settings, database page you should see
Databas key: iTIJQaCj491a4111
(Actually this is the name of the mySQL instance)
In GCP console, go to SQL, click on Instance ID, and on the Instance ID overview page is the instance connection name, e.g., MyProject-123456:us-central1:instancename
Back in app settings
Select Switch to custom database and enter the full connection string
projectname:instancename/schema as
MyProject-123456:us-central1:instancename/iTIJQaCj491a4111
Provide username and password
and follow the steps to confirm existing database
Turns out the issue is when you publish it doesn't push the data, you have to manually re-upload the data into the live version. This is actually a good thing, but I wish it'd been explicitly documented. I found it, after figuring it out on my own, in some early release notes from a few years back. I guess I wasn't the only one this stupid.

Accessing the default mongodb database through console

Started meteor+mongodb yesterday so probably it is a simple thing:
When we create a new project with meteor create appname and then run it with meteor run Meteor automatically creates a simple project for us, right? (that simple app with a button and a counter).
Ok, based in the fact that all meteor project has his own mongodb associated, how can I take a look on the default db created? I´d like to use a command on console to check the collection structure created by default..
I´ve tried: show dbs | show collections | Mongo.Collection();
But always get the same error message: use "new" to construct a Mongo.Collection.
Yeah, I know that. I know how to create a new mongodb and then create a collection and insert values on it.
But what about that counter that is already working? It´s storaging his values in a collection already created, right?
I´d like to access it... and maybe modify.. not create one db for my own at this moment... How can I do that?
Thanks
meteor mongo command gives you access to mongo console.
From official documentation:
meteor mongo
Open a MongoDB shell on your local development database, so that you
can view or manipulate it directly.
...you must already have your application running locally with meteor run.
http://docs.meteor.com/#/full/meteormongo

How can I use sqlite in appfog?

I'm using flask on appfog.com to make a personal blog. Today I tried to use sqlite. I can run the application locally with sqlite but when I update the app to AppFog, it does not seem to work. I can't find how to use sqlite in AppFog's docs. Can anyone tell me?
Thanks...
Sorry for my poor english:-)
It's not recommended to use sqlite for your production apps on AppFog because the file storage is ephemeral. Every time you update your app the database will get blown away. You're better off creating and binding a postgres, mysql, or mongodb database service for your app. You can continue to use sqlite db locally but your production app will use the bound service.
See the Bind Service section of: https://docs.appfog.com/languages/python/flask

I need an alternative for PHP data storage (simular to MySQL and SQLite DB's)

I'm working on a WordPress theme that includes a subscribe form which doesn't work correctly at the moment because i can't figure out where to store the user's info.
I cannot use MySQL because of the target market host's security. I cannot use SQLite because I cannot pre-install it into the theme and I'd like to make it as easy for the user as possible (already setup) so the last thing id want to ask them to do is setup a SQLite database.
I know there are other ways to store info, like in .txt files, but i need something that will work like a database. Something that can update certain fields in certain rows etc etc.
Any ideas guys?
Thanks!
How are you planning to get WordPress running without MySQL? It's not like it will run on any random database — as stated on WordPress.org:
Currently, the only database supported by WordPress is MySQL version 4.1.2 or greater.
If you're wondering how to store information in the database WordPress is already using (which I assume must be MySQL), you should have a look at get_user_meta, add_user_meta, update_user_meta and delete_user_meta.
These functions will store additional information (meta data) alongside a user object within WordPress' database and you won't have to worry about the database at all. Just invoke the functions like any other PHP functions and you should be fine.

Resources