'use strict';

const Node = require('../Node');

class TableLocation extends Node
{
	constructor(complexIdent)
	{
		super();

		const source = complexIdent.fragments.shift();

		if (source !== '@') {
			throw new Error('Invalid table location');
		}

		this.fragments = complexIdent.fragments;
	}

	getFragments()
	{
		return this.fragments;
	}
}

module.exports = TableLocation;

'use strict';

const ComplexIdent = require('./ComplexIdent');

class TableLocation extends ComplexIdent
{
	constructor(complexIdent)
	{
		super([]);

		const fragments = complexIdent.fragments.slice();
		const source = fragments.shift();

		if (source !== '@') {
			throw new Error('Invalid table location');
		}

		this.fragments = fragments;
	}
}

module.exports = TableLocation;

Make binding working in table location (JOIN)
Make binding working in table location (JOIN)